Big O – w/ Ruby Examples

I had a hard time finding an explanation of all basic Big O concepts with practical use cases and code examples (ruby).

Each algorithm is broken down into 4 parts:
  1. Basic Definition (only what you need to know to understand the basics of this approach).
  2. Real life example (what you do in your daily life that mirrors this algorithm, reading a book, feeding your cat etc).
  3. Ruby code example (the most basic code example that I can think of).
  4. Other things you have done or may do in your programming day to day.

Continue reading