To follow up from my previous post, let's dig more into some patterns that revolve around heaps! When you're given a question that revolves around...
If we have a problem where we're interested in knowing the smallest in element in one part of a given set of elements and the biggest element in the...
Ah, a good old linked list problem. Some people love them, some people help them. Hopefully with this pattern, you'll love questions which ask you to...
This pattern is useful when dealing with problems involving arrays containing numbers in a range. How would you solve the following problem? Given n...
This pattern is useful when dealing with interval questions. A lot of the questions will require us to merge overlapping intervals in a given...
This is quite a nifty pattern to apply to linked lists (also arrays and other sequences). Also known as: Hare and Tortoise algorithm. Floyd's...