/cracking_the_coding_interview_4thED

My Solutions to Cracking the Coding Interview

Primary LanguageC++MIT LicenseMIT

Solutions to Cracking the Coding Interview

I followed the advise in the book and code a solution first in a plain text editor without any IDE features or highlighting.
Solutions are then validated in Compiler Explorer. In the sub folders you can find the *.cpp files and I list the Compiler Explorer links below so one can quickly test it.

I'm sharing this here because "why not ?" and git is an easy backup solution for this.
There are solutions in the bock so I don't know if this if going to be the slightest bit useful to anyone else.
But to you my dear internet stranger who somehow manged to end up here: feel free to use this however you want 😉

Compiler Explorer Links:

Chapter 1 - Arrays and Strings

  1. String has unique chars
  2. Reverse C-Style string
  3. Remove duplicates from string
  4. String is anagram
  5. String replace space with %20
  6. Rotate NxN Matrix, (I did MxN)
  7. Matrix set cols&rows zero
  8. Is string A rotation of String B?

Chapter 2 - (Singly) Linked Lists

  1. Remove Duplicates
  2. Get Nth Last
  3. Remove Middle Node
  4. Add Lists of Digits
  5. Find Beginning of Loop

Chapter 3 - Stacks and Queues

  1. 3 Stacks, 1 Array
  2. 3 Stacks, O(1) min element
  3. Set of Stacks
  4. Hanoi Stacks
  5. Queue from Stacks
  6. Sort a Stack