Leetcode study plan - 30 DAY FAANG INTERVIEW PREPARATION

 This article comprises of questions from Leetcode which can help you in your preparation for FAANG in just 30 days. I collected these questions from bunch of resources online, striver and are based on past interviews. Feel free to comment incase i missed any important question.

Day1: (Arrays) - Questions

  1. Find the duplicate in an array of N integers.
  2. Sort Color or Sort an array of 0’s 1’s 2’s without using extra space or sorting algo
  3. Missing Number
  4. Find the Duplicate Number
  5. Merge two sorted Arrays without extra space
  6. Maximum Subarray - Kadane’s Algorithm
  7. Merge Overlapping Subintervals

Day2: (Arrays) - Questions

  1. Set Matrix Zeros
  2. Pascal Triangle
  3. Next Permutation
  4. Rotate Array
  5. Stock Buy and Sell
  6. Spiral Matrix

Day3: (Math) - Questions

  1. Excel Column Number
  2. Count trailing zeros in factorial of a number
  3. Grid Unique Paths

Day4: (Hashing) - Questions

  1. 2 Sum problem
  2. 4 Sum problem
  3. Longest Consecutive Sequence
  4. Longest Subarray with K sum
  5. Count number of subarrays with given XOR(this clears a lot of problems)
  6. Longest substring without repeating characters

Day5: (LinkedList) - Questions

  1. Reverse a LinkedList
  2. Find middle of LinkedList
  3. Merge two sorted Linked List
  4. Remove Nth node from back of LinkedList
  5. Delete a given Node when a node is given. (0(1) solution)
  6. Add two numbers as LinkedList

Day6: (LinkedList) - Questions

  1. Find intersection point of Y LinkedList
  2. Check if a LinkedList is palindrome or not.
  3. Reverse a LinkedList in groups.
  4. Detect a cycle and removing loop(two different questions and same concept)
  5. Flattening of a LinkedList
  6. Rotate a LinkedList
  7. Clone a Linked List with random and next pointer.

Day7: (2pointer) - Questions

  1. Trapping rainwater
  2. Remove Duplicate from Sorted array
  3. Max continuous number of 1’s

Day8: (Greedy) - Questions

  1. Greedy algorithm to find minimum number of coins
  2. Fractional Knapsack Problem - Partition Equal Subset Sum - https://leetcode.com/discuss/interview-question/1066692/fractional-knapsack
  3. Maximum Profit in Job Scheduling

Day9: (Backtracking) - Questions

  1. N queens Problem
  2. Sudoko
  3. Print all Permutations of a string/array
  4. Word Break (print all ways)

Day10: - Questions

  1. Combination sum1
  2. Combination sum2
  3. Median of Two Sorted Arrays

Day11: (Divide and Conquer) - Questions

  1. Find the element that appears once in sorted array, and rest element appears twice (Binary search)
  2. Search element in a sorted and rotated array.
  3. Find Median from data stream

Day12: (Bits) - Questions

  1. Check if a number if a power of 2 or not in O(1)
  2. Count total set bits
  3. Divide Integers without / operator
  4. Power Set (this is very important)
  5. Find MSB in o(1)
  6. Find square of a number without using multiplication or division operators.

Day13: (Stack and Queue) - Questions

  1. Implement Stack using Queue
  2. Implement Queue using Stack
  3. Check for balanced parentheses
  4. Next Greater Element

Day14: - Questions

  1. Next Smaller Element
  2. LRU cache (vvvv. imp)
  3. Largest rectangle in histogram
  4. Sliding Window maximum
  5. Implement Min Stack
  6. Rotten Orange (Using BFS)

Day15: (String) - Questions

  1. Reverse Words in a String
  2. Longest Palindrome in a string
  3. Roman Number to Integer and vice versa
  4. Implement ATOI/STRSTR
  5. Longest Common Prefix

Day16: (String) - Questions

  1. Prefix Function/ZFunction
  2. KMP algo
  3. Minimum characters needed to be inserted in the beginning to make it palindromic.
  4. Check for Anagrams
  5. Count and Say
  6. Compare version numbers

Day17: (Binary Tree) - Questions

  1. Inorder Traversal (with recursion and without recursion)
  2. Preorder Traversal (with recursion and without recursion)
  3. Postorder Traversal (with recursion and without recursion)
  4. LeftView Of Binary Tree
  5. Bottom View of Binary Tree
  6. Top View of Binary Tree

Day18: (Binary Tree) - Questions

  1. Level order Traversal / Level order traversal in spiral form
  2. Height of a Binary Tree
  3. Diameter of Binary Tree
  4. Check if Binary tree is height balanced or not
  5. LCA in Binary Tree
  6. Check if two trees are identical or not

Day 19: (Binary Tree) - Questions

  1. Maximum path sum
  2. Construct Binary Tree from inorder and preorder
  3. Construct Binary Tree from Inorder and Postorder
  4. Symmetric Binary Tree
  5. Flatten Binary Tree to LinkedList
  6. Check if Binary Tree is mirror of itself or not

Day 20: (Binary Search Tree) - Questions

  1. Populate Next Right pointers of Tree
  2. Search given Key in BST
  3. Construct BST from given keys.
  4. Check is a BT is BST or not
  5. Find LCA of two nodes in BST
  6. Find the inorder predecessor/successor of a given Key in BST.
  7. print path given sum

Day21: (Binary Search Tree) - Questions

  1. Floor and Ceil in a BST
  2. Find Kth smallest and Kth largest element in BST (2 different Questions)
  3. Find a pair with a given sum in BST
  4. BST iterator
  5. Size of the largest BST in a Binary Tree
  6. Serialize and deserialize Binary Tree

Day22: (Mixed Questions) - Questions

  1. Binary Tree to Double Linked List
  2. Find median in a stream of running integers.
  3. Kth largest element in a stream.
  4. Distinct numbers in Window.
  5. Kth largest element in an unsorted array.
  6. Floodfill Algorithm

Day23: (Graph) - Questions

  1. Clone a graph (Not that easy as it looks)
  2. DFS
  3. BFS
  4. Detect A cycle in Undirected Graph/Directed Graph
  5. Topo Sort
  6. Number of islands (Do in Grid and Graph both)
  7. Bipartite Check

Day24: (Graph)- Questions

  1. SCC(using KosaRaju’s algo)
  2. Djisktra’s Algorithm
  3. Bellman Ford Algo
  4. Floyd Warshall Algorithm
  5. MST using Prim’s Algo
  6. MST using Kruskal’s Algo

Day25: (Dynamic Programming) - Questions

  1. Max Product Subarray
  2. Longest Increasing Subsequence
  3. Longest Common Subsequence
  4. 01 Knapsack
  5. Edit Distance
  6. Maximum sum increasing subsequence
  7. Matrix Chain Multiplication

Day26: (DP) - Questions

  1. Maximum sum path in matrix, (count paths, and similar type do, also backtrack to find the maximum path)
  2. Coin change
  3. Subset Sum
  4. Rod Cutting
  5. Egg Dropping
  6. Word Break
  7. Palindrome Partitioning (MCM Variation)

Day27: (OS)-

  1. Process (Attributes, state, life cycle, PCB) vs Thread.
  2. Scheduling Algorihtms
  3. Multiprogramming vs Multiprocessing vs Multitasking vs Multithreading.
  4. Memory Allocation
    a) Fixed Partioning
    b) Dynamic Partioning
    c) Paging
    d) Segmentation
  5. Internal and External Fragmentation.
  6. Memory Allocation Technique.
  7. Page replacement Algos
  8. Deadlock
  9. Critical section problem
  10. Mutex vs Semaphore

Day28: DBMS -

  1. Advantage of DBMS
  2. All type of Keys and their usage
  3. Normalization
  4. SQL queries
  5. Joins
  6. Trigger, cursor, view
  7. Dirty read problem
  8. ACID properties.
  9. Indexing | Indexing methods

Day29: NETWORKING -

  1. Network Topology
  2. Switch hub router bridge
  3. Transmission modes
  4. ipv4 vs ipv6
  5. subnetting in IP
  6. OSI layer
  7. TCP/IP model
  8. TCP vs UDP
  9. DNS DHCP FTP HTTP vs HTTPS SMTP SNMP
  10. Flow vs Error control

Day30: PROJECTS -

  1. Description of projects mentioned in resume, and do indepth reasearch on the tech stack and questions related to them.

Hope these preparation path helps you get your offers from your dream company. All The Best!

Men' fashion , Dating Tips , Relationship Advice

Post a Comment