We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I worked sythentic division (very slow), reaching a point of root check
-b/a and brute force computing sub polynomials (still too slow), then precomputing polynomial with possible root -b/a as a basis for root checking sub polynomials, and then integrating binary search tree on coefficient index updated values (per query) which is still too slow. Fenwick tree is a key prefix data structure for mutating polynomial coefficients and pertinent sub polynomials on query set. Recall summation difference between front and tail of sub polynomial, once polynomial array (including query updates) is computed and allows for rapid computation on subpolynomial summation series. Also worth noting this is computed (per large integers) on modulus p, so rationals on the set of reals need to be converted to integers mod p. That is computing for a/b compute b^-1 to compute a*b^-1%p.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Polynomial Division
You are viewing a single comment's thread. Return to all comments →
I worked sythentic division (very slow), reaching a point of root check -b/a and brute force computing sub polynomials (still too slow), then precomputing polynomial with possible root -b/a as a basis for root checking sub polynomials, and then integrating binary search tree on coefficient index updated values (per query) which is still too slow. Fenwick tree is a key prefix data structure for mutating polynomial coefficients and pertinent sub polynomials on query set. Recall summation difference between front and tail of sub polynomial, once polynomial array (including query updates) is computed and allows for rapid computation on subpolynomial summation series. Also worth noting this is computed (per large integers) on modulus p, so rationals on the set of reals need to be converted to integers mod p. That is computing for a/b compute b^-1 to compute a*b^-1%p.