Cracking the coding interview exercises and notes
Go to file
anebz 8bc5728d9f chapters 12-15, theory done 2020-10-19 14:16:31 +02:00
01. Arrays and strings hackerrank weighted uniform string 2019-12-10 17:22:44 +01:00
02. Linked lists fix: reordering and fix of small errors 2019-09-19 09:30:43 +02:00
03. Stacks and queues small formatting update 2019-10-12 20:59:02 +02:00
04. Trees and graphs 4.4. unfinished 2020-02-11 10:35:29 +01:00
05. Bit manipulation chapter 6 theory 2020-04-16 16:48:25 +02:00
06. Math and logic puzzles chapter 7 exercises 2020-05-21 20:48:47 +02:00
07. Object-Oriented design 7.7: chat server telegram example 2020-06-04 18:50:57 +02:00
08. Recursion ctci ch9 theory and 2 exercises 2020-09-14 09:40:02 +02:00
09. System design and scalability ch9 done ✔️ 2020-10-09 15:57:16 +02:00
10. Sorting and searching chapter 10 done ✔️ 2020-10-13 17:47:33 +02:00
11. Testing chapter 11 done ✔️ 2020-10-13 17:47:39 +02:00
12. C++ chapters 12-15, theory done 2020-10-19 14:16:31 +02:00
13. Java chapters 12-15, theory done 2020-10-19 14:16:31 +02:00
14. Databases chapters 12-15, theory done 2020-10-19 14:16:31 +02:00
15. Threads and locks chapters 12-15, theory done 2020-10-19 14:16:31 +02:00
16. Moderate problems 16.25. LRU cache 2019-09-19 09:31:26 +02:00
17. Hard problems 17.14. word transformer 2019-05-09 17:00:53 +02:00
18. Advanced topics small formatting update 2019-10-12 20:59:02 +02:00
Missing CS semester chapter 6 theory 2020-04-16 16:48:25 +02:00
.gitignore fixed reverse double linked list code 2019-08-12 20:01:19 +02:00
README.md chapter 10 done ✔️ 2020-10-13 17:47:33 +02:00
introduction.md renaming and reordering 2019-03-27 16:45:11 +01:00

README.md

Cracking the coding interview exercises and notes

If you can't afford to buy the book, you can find a free pdf here (last updated on 2020.10.09).

Introduction

  1. Big O
  2. Technical questions

Chapter 1 Arrays and strings

  • check unique characters
  • check if permutation
  • replace character by substring
  • Levenshtein distance
  • String compression
  • Matrix rotation
  • String rotation
  • Hash tables (chapter 7)
  • Magic index (chapter 8)
  • Search in sorted matrix (chapter 10)

Chapter 2 Linked lists

  • Remove duplicates
  • Return kth to last
  • Delete middle node
  • Partition list
  • Sum lists
  • Check if palindrome
  • Insert node at beginning
  • Insert node at end
  • Reverse list, single and double linked
  • List intersection
  • Loop detection

Chapter 3 Stacks and queues

  • 3 stacks in array
  • Min function in stack
  • List of stacks
  • Queue via stack
  • Sort stack
  • Animal shelter (enqueue and dequeue with ordering)

Chapter 4 Trees and graphs

  • Find route between nodes in graph
  • Create minimal binary search tree from array
  • Create a linked list for each depth in the tree

Chapter 5 Bit manipulation

  • Insert bit
  • Binary to string
  • Flip bit to create longest sequence of 1s
  • (( n & (n-1)) == 0). n=?
  • How many different bits do two numbers have. 11001 vs. 11010 = 2. Levenstein distance

Chapter 6 Math and logic puzzles

  • Prime numbers

Chapter 7 Object-oriented design

  • Call center
  • Parking lot
  • Chat server
  • Hash tables

Chapter 8 Recursion

  • Triple step
  • Robot in grid
  • Magic index (index such that A[i] = 1)
  • Power set
  • Permutations of string with unique characters
  • Permutations of string with duplicate characters

Chapter 9 System design and scalability

  • Stock data
  • Social network
  • Web crawler
  • Duplicate URLs
  • Cache
  • Sales rank
  • Personal finance manager

Chapter 10 Sorting and searching

  • Sorted merge
  • Anagrams
  • Search in rotated array
  • Sorted search, no size
  • Sorted matrix search
  • Sparse search
  • Sort big file
  • Missing int
  • Find duplicates
  • Sorted matrix search
  • Rank for stream

Chapter 11 Testing

  • Mistake
  • Random crashes
  • Chess test
  • Test a pen
  • Test an ATM

Chapter 16 Moderate problems

  • Write an integer in english
  • Contiguous sequence or Maximum subarray
  • Least Recently Used cache

Chapter 18 Advanced topics

  • Hash table collision resolution
  • Rabin-Karp substring search