Skip to content

🥷 Cracking the MAANG Interviews | Google & Bloomberg | Algorithms and Data Structures | Tips and Resources

Notifications You must be signed in to change notification settings

Rustam-Z/cracking-maang

Repository files navigation

Cracking the Coding Interview

Rustam-Z🚀 • 8 June 2021

Join my Telegram channel: @cracking_swe, where I share MAANG interview preparation resources.

Contents

General plan

  1. Learn DS and Algorithms
  2. Solve algorithms
  3. Repeat concepts
  4. Learn System Design
  5. Write a resume
  6. Prepare for a behavioral interview
  7. Find people for referral and apply
  8. Pass the interview
  9. Get an offer, and negotiate salary! 🍾

How to approach solving the algorithm?

Constraints, Ideas, Complexities, Code, and Tests

  1. Read the problem. Don’t immediately jump into coding!
  2. Understand inputs & outputs. Draw some examples on paper.
  3. Ask questions, and find constraints. Find edge cases. Example questions: is it ASCII or Unicode? what is the Max value? is there a difference between capital letters and small letters?
  4. Thinking about the solution in mind. Divide problems into sub-problems.
  5. Evaluate the complexity
  6. Think better alternative solution
  7. Write code on paper
  8. Debug your code on paper and test with new corner case inputs
  9. Write code and write tests

Algorithms Learning Plan

System Design Learning Plan

  • "Systems Expert" from AlgoExpert
  • "System Design Interview" book - 1st and 2nd editions
  • "Grokking the System Design Interview" (educative.io)
  • "Designing Data-Intensive Applications" book
  • Tushar

Extra Resources

Algorithms & Data Structures Readings

Topics

  • Big-O = how quickly the runtime grows relative to the input as the input gets arbitrarily large.
  • Strings
    • ASCII, Unicode
    • How are strings implemented in your programming language (for example, is there a maximum length)?
    • Search for substrings (for example, the Rabin-Karp algorithm).
    • RegEx
  • Arrays
    • Details of implementation in your programming language. For example, for C++ you need to know the implementation using pointers, and vectors. For vectors, you also need to know, for example, that it periodically does resize, and other similar details.
  • Linked lists
    • Singly linked list
    • Doubly linked list
  • Stacks and Queues
  • Trees
    • DFS, BFS
    • Adding and removing elements
    • Less common tree types (e.g., red black trees, B-trees) - what are they, how they differ from the binary trees, basic complexities, and how they are used. No need to know all the rotations in the RB-tree, for example.
    • Tries
  • Heaps
    • Heap sort
    • Using heaps for tracking top-K
    • Allocating elements on a heap vs on a stack - what does it mean?
  • Graphs
    • DFS, BFS
    • Topological search
    • Shortest path
  • Hash
    • Hash functions
    • Universal hash
  • Algorithms
    • Sorting
      • Especially make sure you know heap sort, merge sort and quick sort.
    • Searching
      • Binary search
      • Searching in linked lists, arrays, trees, graphs, dictionaries...
    • Dynamic programming = problems, which are problems where the solution is composed of solutions to the same problem with smaller inputs.
      • Bottom-up
      • Top-down
    • Backtracking = Backtracking is an algorithmic technique for solving problems recursively by trying to build a solution incrementally, one piece at a time.
    • Greedy algorithms
    • Recursion