Explore >> Select a destination


You are here

sortingsearching.com
| | www.adamconrad.dev
5.7 parsecs away

Travel
| | Follow along with Steven Skiena's Fall 2018 algorithm course applied to the JavaScript language.
| | algorithmsoup.wordpress.com
5.9 parsecs away

Travel
| | The ``probabilistic method'' is the art of applying probabilistic thinking to non-probabilistic problems. Applications of the probabilistic method often feel like magic. Here is my favorite example: Theorem (Erdös, 1965). Call a set $latex {X}&fg=000000$ sum-free if for all $latex {a, b \in X}&fg=000000$, we have $latex {a + b \not\in X}&fg=000000$. For any finite...
| | rcoh.me
4.5 parsecs away

Travel
| | Finding the median in a list seems like a trivial problem, but doing so in linear time turns out to be tricky. In this post I'm going to walk through one of my favorite algorithms, the median-of-medians approach to find the median of a list in deterministic linear time. Although proving that this algorithm runs in linear time is a bit tricky, this post is targeted at readers with only a basic level of algorithmic analysis.
| | miparnisariblog.wordpress.com
28.2 parsecs away

Travel
| PatternDescriptionExample usagesWorks onTwo pointersIterate over an array or multiple arrays to achieve some goal, faster than O(n^2)Finding palindromes, merging two arrays, subsequences in stringsUnsorted arrays, sorted arrays, stringsSliding windowFind a subarray that satisfies some numerical constraint. (If the constraint involves counting, use a hashmap).Add elements from the right until the constraint is broken, then remove...