|
You are here |
www.integralist.co.uk | ||
| | | | |
adrianmejia.com
|
|
| | | | | JavaScript tutorials and web development articles including topics like NodeJS, Angular, VueJS, Data Structures and Algorithms. | |
| | | | |
lukesingham.com
|
|
| | | | | Grokking Algorithms is a beautifully formatted book that explains complex material simply using pictures, analogies and high level practical explanations. This post is a review and summary of the Grokking Algorithms book. | |
| | | | |
schadokar.dev
|
|
| | | | | Quicksort is one of the efficient sorting algorithms and the average complexity is `O(n log n)`. | |
| | | | |
www.jeremykun.com
|
|
| | | Problem: Compute the product of two polynomials efficiently. Solution: import numpy from numpy.fft import fft, ifft def poly_mul(p1, p2): """Multiply two polynomials. p1 and p2 are arrays of coefficients in degree-increasing order. """ deg1 = p1.shape[0] - 1 deg2 = p1.shape[0] - 1 # Would be 2*(deg1 + deg2) + 1, but the next-power-of-2 handles the +1 total_num_pts = 2 * (deg1 + deg2) next_power_of_2 = 1 << (total_num_pts - 1). | ||