My solutions to the interview questions from the Cracking the Coding Interview book, and also from other places like LeetCode.
git clone https://github.com/saccharineboi/InterviewPrep
cd InterviewPrep
make
make test
Questions from the Cracking the Coding Interview
- 1.1 Is Unique
- 1.2 Check Permutation
- 1.3 URLify
- 1.4 Palindrome Permutation
- 1.5 One Away
- 1.6 String Compression
- 1.7 Rotate Matrix
- 1.8 Zero Matrix
- 1.9 String Rotation
- 2.1 Remove Dups
- 2.2 Return Kth to Last
- 2.3 Delete Middle Node
- 2.4 Partition
- 2.5 Sum Lists
- 2.6 Palindrome
- 2.7 Intersection
- 2.8 Loop Detection
- 3.1 Three in One
- 3.2 Stack Min
- 3.3 Stack of Plates
- 3.4 Queue via Stacks
- 3.5 Sort Stack
- 3.6 Animal Shelter
- 4.1 Route Between Nodes
- 4.2 Minimal Tree
- 4.3 List of Depths
- 4.4 Check Balanced
- 4.5 Validate BST
- 4.6 Successor
- 4.7 Build Order
- 4.8 First Common Ancestor
- 4.9 BST Sequences
- 4.10 Check Subtree
- 4.11 Random Node
- 4.12 Paths with Sum
- Dynamic Array
- Templated Dynamic Array
- Linked List
- Templated Linked List
- Doubly Linked List
- Templated Doubly Linked List
- Stack
- Templated Stack
- Queue
- Templated Queue
- DoubleEndedQueue
- Templated DoubleEndedQueue
- Tortoise and Hare
- Binary Search
- Bubble Sort
- Insertion Sort
There is no license. All code is in public domain.