Thursday, December 26, 2019

Resources for Interview preparation - Leetcode

Original post here: Link



Best Github Repository for interview preparations

  1. https://github.com/jwasham/coding-interview-university
  2. https://github.com/CyC2018/CS-Notes
  3. https://github.com/kdn251/interviews
  4. https://github.com/yangshun/tech-interview-handbook
  5. https://github.com/azl397985856/leetcode

Best Resources for interview preparation

  1. CodeChef Certified Data Structure & Algorithms Programme (CCDSAP)
  2. Coding Blocks
  3. Hackerearth Practice
  4. Hackmd.io

List of Programing challenge website

  1. https://www.topcoder.com/challenges
  2. https://www.hackerrank.com
  3. https://codefights.com
  4. https://www.codingame.com
  5. https://www.halite.io
  6. https://www.codewars.com
  7. https://projecteuler.net
  8. https://leetcode.com
  9. https://www.codechef.com
  10. https://www.hackerearth.com
  11. https://practity.com
  12. https://coderbyte.com
  13. https://www.codeabbey.com
  14. https://www.spoj.com
  15. https://codingbat.com
  16. https://dmoj.ca
  17. https://open.kattis.com
  18. https://exercism.io
  19. https://screeps.com
  20. http://rosalind.info
  21. https://reddit.com/r/dailyprogrammer
  22. https://www.geeksforgeeks.org
  23. https://codesignal.com
  24. https://perlweeklychallenge.org
  25. https://adventofcode.com
  26. https://www.dailycodingproblem.com
  27. http://www.4clojure.com
  28. https://www.thehuxley.com
  29. https://www.firecode.io
  30. https://edabit.com

List of Topic and corresponding leetcode questions


Arrays

Easy:

  1. Contains Duplicate: https://leetcode.com/problems/contains-duplicate/
  2. Missing Number: https://leetcode.com/problems/missing-number/
  3. Find All Numbers Disappeared in an Array: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/
  4. Single Number: https://leetcode.com/problems/single-number/

Medium:

  1. Product of Array Except Self: https://leetcode.com/problems/product-of-array-except-self/
  2. Find the Duplicate Number: https://leetcode.com/problems/find-the-duplicate-number/
  3. Find All Duplicates in an Array: https://leetcode.com/problems/find-all-duplicates-in-an-array/

Hard:

  1. First Missing Positive: https://leetcode.com/problems/first-missing-positive/
  2. Longest Consecutive Sequence: https://leetcode.com/problems/longest-consecutive-sequence/
Backtracking

Easy:

  1. Letter Case Permutation: https://leetcode.com/problems/letter-case-permutation/

Medium:

  1. Subsets: https://leetcode.com/problems/subsets/
  2. Subsets II: https://leetcode.com/problems/subsets-ii/
  3. Permutations: https://leetcode.com/problems/permutations/
  4. Permutations II: https://leetcode.com/problems/permutations-ii/
  5. Combinations: https://leetcode.com/problems/combinations/
  6. Combination Sum: https://leetcode.com/problems/combination-sum/
  7. Combination Sum II: https://leetcode.com/problems/combination-sum-ii/
  8. Combination Sum III: https://leetcode.com/problems/combination-sum-iii/
  9. Generate Parentheses: https://leetcode.com/problems/generate-parentheses/
  10. Target Sum: https://leetcode.com/problems/target-sum/
  11. Palindrome Partitioning: https://leetcode.com/problems/palindrome-partitioning/
  12. Partition to K Equal Sum Subsets: https://leetcode.com/problems/partition-to-k-equal-sum-subsets/
  13. Letter Combinations of a Phone Number: https://leetcode.com/problems/letter-combinations-of-a-phone-number/
  14. Generalized Abbreviation: https://leetcode.com/problems/generalized-abbreviation/

Hard:

  1. Sudoku Solver: https://leetcode.com/problems/sudoku-solver/
  2. N-Queens: https://leetcode.com/problems/n-queens/
Dynamic Programming

Easy:

  1. Climbing Stairs: https://leetcode.com/problems/climbing-stairs/
  2. House Robber: https://leetcode.com/problems/house-robber/
  3. Best Time to Buy and Sell Stock: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
  4. Maximum Subarray: https://leetcode.com/problems/maximum-subarray/
  5. Range Sum Query - Immutable: https://leetcode.com/problems/range-sum-query-immutable/

Medium:

  1. House Robber II: https://leetcode.com/problems/house-robber-ii/
  2. Coin Change: https://leetcode.com/problems/coin-change/
  3. Maximum Product Subarray: https://leetcode.com/problems/maximum-product-subarray/
  4. Longest Increasing Subsequence: https://leetcode.com/problems/longest-increasing-subsequence/
  5. Longest Palindromic Substring: https://leetcode.com/problems/longest-palindromic-substring/
  6. Word Break: https://leetcode.com/problems/word-break/
  7. Combination Sum: https://leetcode.com/problems/combination-sum-iv/
  8. Decode Ways: https://leetcode.com/problems/decode-ways/
  9. Unique Paths: https://leetcode.com/problems/unique-paths/
  10. Palindromic Substrings: https://leetcode.com/problems/palindromic-substrings/
  11. Number of Longest Increasing Subsequence: https://leetcode.com/problems/number-of-longest-increasing-subsequence/
  12. Partition Equal Subset Sum: https://leetcode.com/problems/partition-equal-subset-sum/
  13. Best Time to Buy and Sell Stock with Cooldown: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
  14. Counting Bits: https://leetcode.com/problems/counting-bits/

Hard:

  1. Longest Valid Parentheses: https://leetcode.com/problems/longest-valid-parentheses/
Fast & Slow Pointers

Easy:

  1. Linked List Cycle: https://leetcode.com/problems/linked-list-cycle/
  2. Middle of the Linked List: https://leetcode.com/problems/middle-of-the-linked-list/
  3. Palindrome Linked List: https://leetcode.com/problems/palindrome-linked-list/
  4. Remove Linked List Elements: https://leetcode.com/problems/remove-linked-list-elements/
  5. Remove Duplicates from Sorted List: https://leetcode.com/problems/remove-duplicates-from-sorted-list/

Medium:

  1. Linked List Cycle II: https://leetcode.com/problems/linked-list-cycle-ii/
  2. Add Two Numbers: https://leetcode.com/problems/add-two-numbers/
  3. Remove Nth Node From End Of List: https://leetcode.com/problems/remove-nth-node-from-end-of-list/
  4. Sort List: https://leetcode.com/problems/sort-list/
  5. Reorder List: https://leetcode.com/problems/reorder-list/
Graph Traversals

Medium:

  1. Clone Graph: https://leetcode.com/problems/clone-graph/
  2. Course Schedule: https://leetcode.com/problems/course-schedule/
  3. Pacific Atlantic Water Flow: https://leetcode.com/problems/pacific-atlantic-water-flow/
  4. Number of Islands: https://leetcode.com/problems/number-of-islands/
  5. Graph Valid Tree: https://leetcode.com/problems/graph-valid-tree/
  6. Number of Connected Components in an Undirected Graph: https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/
In-place Reversal of a Linked List

Easy:

  1. Reverse Linked List: https://leetcode.com/problems/reverse-linked-list/

Medium:

  1. Reverse Linked List II: https://leetcode.com/problems/reverse-linked-list-ii/
  2. Rotate List: https://leetcode.com/problems/rotate-list/
  3. Swap Nodes in Pairs: https://leetcode.com/problems/swap-nodes-in-pairs/
  4. Odd Even Linked List: https://leetcode.com/problems/odd-even-linked-list/

Hard:

  1. Reverse Nodes in k-Group: https://leetcode.com/problems/reverse-nodes-in-k-group/
K-Way Merge

Easy:

  1. Merge Two Sorted Lists: https://leetcode.com/problems/merge-two-sorted-lists/

Hard:

  1. Merge k Sorted Lists: https://leetcode.com/problems/merge-k-sorted-lists/
Matrices

Medium:

  1. Set Matrix Zeroes: https://leetcode.com/problems/set-matrix-zeroes/
  2. Spiral Matrix: https://leetcode.com/problems/spiral-matrix/
  3. Rotate Image: https://leetcode.com/problems/rotate-image/
  4. Word Search: https://leetcode.com/problems/word-search/
  5. Kth Smallest Element in a Sorted Matrix: https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/
Intervals

Easy:

  1. Meeting Rooms: https://leetcode.com/problems/meeting-rooms

Medium:

  1. Merge Intervals: https://leetcode.com/problems/merge-intervals/
  2. Interval List Intersections: https://leetcode.com/problems/interval-list-intersections/
  3. Non-overlapping Intervals: https://leetcode.com/problems/non-overlapping-intervals/
  4. Meeting Rooms II: https://leetcode.com/problems/meeting-rooms-ii/
  5. Task Scheduler: https://leetcode.com/problems/task-scheduler/
  6. Minimum Number of Arrows to Burst Balloons: https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/

Hard:

  1. Insert Interval: https://leetcode.com/problems/insert-interval/
  2. Employee Free Time: https://leetcode.com/problems/employee-free-time/
Modified Binary Search

Easy:

  1. Binary Search: https://leetcode.com/problems/binary-search/
  2. Find Smallest Letter Greater Than Target: https://leetcode.com/problems/find-smallest-letter-greater-than-target/
  3. Peak Index in a Mountain Array: https://leetcode.com/problems/peak-index-in-a-mountain-array/

Medium:

  1. Find Minimum in Rotated Sorted Array: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/
  2. Find Peak Element: https://leetcode.com/problems/find-peak-element/
  3. Search in Rotated Sorted Array: https://leetcode.com/problems/search-in-rotated-sorted-array/
  4. Search in Rotated Sorted Array II: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/
  5. Search a 2D Matrix: https://leetcode.com/problems/search-a-2d-matrix/
  6. Search a 2D Matrix II: https://leetcode.com/problems/search-a-2d-matrix-ii/

Hard:

  1. Count of Range Sum: https://leetcode.com/problems/count-of-range-sum/
Sliding Window

Medium:

  1. Minimum Size Subarray Sum: https://leetcode.com/problems/minimum-size-subarray-sum/
  2. Fruit Into Baskets: https://leetcode.com/problems/fruit-into-baskets/
  3. Permutation in String: https://leetcode.com/problems/permutation-in-string/
  4. Longest Repeating Character Replacement: https://leetcode.com/problems/longest-repeating-character-replacement/
  5. Longest Substring Without Repeating Characters: https://leetcode.com/problems/longest-substring-without-repeating-characters/

Hard:

  1. Sliding Window Maximum: https://leetcode.com/problems/sliding-window-maximum/
  2. Minimum Number of K Consecutive Bit Flips: https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/
  3. Unique Letter String: https://leetcode.com/problems/unique-letter-string/
  4. Substring with Concatenation of All Words: https://leetcode.com/problems/substring-with-concatenation-of-all-words/
Top 'K' Elements

Medium:

  1. Kth Smallest Element in a BST: https://leetcode.com/problems/kth-smallest-element-in-a-bst/
  2. K Closest Points to Origin: https://leetcode.com/problems/k-closest-points-to-origin/
  3. Top K Frequent Elements: https://leetcode.com/problems/top-k-frequent-elements/
  4. Sort Characters By Frequency: https://leetcode.com/problems/sort-characters-by-frequency/
  5. Kth Largest Element in an Array: https://leetcode.com/problems/kth-largest-element-in-an-array/
  6. Find K Closest Elements: https://leetcode.com/problems/find-k-closest-elements/
  7. Reorganize String: https://leetcode.com/problems/reorganize-string/

Hard:

  1. Rearrange String k Distance Apart: https://leetcode.com/problems/rearrange-string-k-distance-apart
  2. Course Schedule III: https://leetcode.com/problems/course-schedule-iii/
  3. Maximum Frequency Stack: https://leetcode.com/problems/maximum-frequency-stack/
Topological Sort

Medium:

  1. Course Schedule: https://leetcode.com/problems/course-schedule/
  2. Course Schedule II: https://leetcode.com/problems/course-schedule-ii/
  3. Minimum Height Trees: https://leetcode.com/problems/minimum-height-trees/

Hard:

  1. Alien Dictionary: https://leetcode.com/problems/alien-dictionary
  2. Sequence Reconstruction: https://leetcode.com/problems/sequence-reconstruction
Tree Breadth First Search
The tree BFS technique can be found under 7. Tree BFS [here].

Easy:

  1. Binary Tree Level Order Traversal II: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
  2. Average of Levels in Binary Tree: https://leetcode.com/problems/average-of-levels-in-binary-tree/
  3. Minimum Depth of Binary Tree: https://leetcode.com/problems/minimum-depth-of-binary-tree/

Medium:

  1. Binary Tree Level Order Traversal: https://leetcode.com/problems/binary-tree-level-order-traversal/
  2. Binary Tree Zigzag Level Order Traversal: https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
  3. Populating Next Right Pointers in Each Node: https://leetcode.com/problems/populating-next-right-pointers-in-each-node/
  4. Populating Next Right Pointers in Each Node II: https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/
  5. Binary Tree Right Side View: https://leetcode.com/problems/binary-tree-right-side-view/
  6. All Nodes Distance K in Binary Tree: https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/
  7. Boundary of Binary Tree: https://leetcode.com/problems/boundary-of-binary-tree
Tree Depth First Search

Easy:

  1. Same Tree: https://leetcode.com/problems/same-tree/
  2. Path Sum: https://leetcode.com/problems/path-sum/
  3. Diameter of Binary Tree: https://leetcode.com/problems/diameter-of-binary-tree/
  4. Merge Two Binary Trees: https://leetcode.com/problems/merge-two-binary-trees/
  5. Maximum Depth of Binary Tree: https://leetcode.com/problems/maximum-depth-of-binary-tree/
  6. Lowest Common Ancestor of a Binary Search Tree: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
  7. Subtree of Another Tree: https://leetcode.com/problems/subtree-of-another-tree/
  8. Invert Binary Tree: https://leetcode.com/problems/invert-binary-tree/

Medium:

  1. Path Sum II: https://leetcode.com/problems/path-sum-ii/
  2. Path Sum III: https://leetcode.com/problems/path-sum-iii/
  3. Lowest Common Ancestor of a Binary Tree: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
  4. Maximum Binary Tree: https://leetcode.com/problems/maximum-binary-tree/
  5. Maximum Width of Binary Tree: https://leetcode.com/problems/maximum-width-of-binary-tree/
  6. Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
  7. Validate Binary Search Tree: https://leetcode.com/problems/validate-binary-search-tree/
  8. Kth Smallest Element in a BST: https://leetcode.com/problems/kth-smallest-element-in-a-bst/
  9. Implement Trie (Prefix Tree): https://leetcode.com/problems/implement-trie-prefix-tree/

Hard:

  1. Binary Tree Maximum Path Sum: https://leetcode.com/problems/binary-tree-maximum-path-sum/
  2. Serialize and Deserialize Binary Tree: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
  3. Word Search II: https://leetcode.com/problems/word-search-ii/
Two Heaps

Hard:

  1. Find Median from Data Stream: https://leetcode.com/problems/find-median-from-data-stream/
  2. Sliding Window Median: https://leetcode.com/problems/sliding-window-median/
  3. IPO: https://leetcode.com/problems/ipo/
Two Pointers

Easy:

  1. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/
  2. Remove Duplicates from Sorted List: https://leetcode.com/problems/remove-duplicates-from-sorted-list/
  3. Squares of a Sorted Array: https://leetcode.com/problems/squares-of-a-sorted-array/
  4. Backspace String Compare: https://leetcode.com/problems/backspace-string-compare

Medium:

  1. 3 Sum: https://leetcode.com/problems/3sum/
  2. 3 Sum Closest: https://leetcode.com/problems/3sum-closest/
  3. Subarrays with Product Less than K: https://leetcode.com/problems/subarray-product-less-than-k/
  4. Sort Colours: https://leetcode.com/problems/sort-colors/

Hard:

  1. Minimum Window Substring: https://leetcode.com/problems/minimum-window-substring/
  2. Trapping Rain Water: https://leetcode.com/problems/trapping-rain-water/
  3. Container With Most Water: https://leetcode.com/problems/container-with-most-water/

Comments: 0


No comments:

Post a Comment

My Journey from a Tier-3 College to Microsoft, Google, and Meta: Lessons Learned

Original post: Link   Time to give back to community. Went through couple of post myself and got inspired and belief that cracking FAANG is ...