A pattern cheat sheet with tested solutions

The problem

Build your own reference of the interview patterns: for each one, a signal that tells you to use it, a short template, and a tested solution to one problem.

Requirements

Technologies

Step by step

  1. List the patterns and write the signal that points to each one.
  2. Write one problem and one function per pattern.
  3. Add tests, including empty and single-element inputs.
  4. Compare two fast solutions with brute force on random inputs.

Expected result

A single Python file where every pattern has a template, a tested solution and a stated cost, which you can read before an interview.

How it is evaluated

Ways to improve it