Data Structures

You can use Arrays and HashMaps to build any other Data Structure.

Create any Data Structure you can dream of. Here are the common ones.

Recursion

The most natural way to work with Trees is with Recursion.

All the standard ways of walking through Trees.

Quickly search anything that's sorted in only O(log n) time.

The same as Trees, but you need to avoid cycles.

Avoid making redundant calls in your recursion by storing past results.

Avoid wasting time and space in your recursion by making the Data Structures global.

Iteration

Find a trick to do one pass - you can't do better than that!

Problems that are just asking you to find the "trick". Many of these are Greedy algorithms.

Heaps let you view smallest element quickly. Just like BSTs, they deal with sorted order, so think O(log n).

Here's how to implement any Recursion "without using Recursion".