Original post here: Link
Best Github Repository for interview preparations
- https://github.com/jwasham/coding-interview-university
- https://github.com/CyC2018/CS-Notes
- https://github.com/kdn251/interviews
- https://github.com/yangshun/tech-interview-handbook
- https://github.com/azl397985856/leetcode
Best Resources for interview preparation
- CodeChef Certified Data Structure & Algorithms Programme (CCDSAP)
- Coding Blocks
- Hackerearth Practice
- Hackmd.io
List of Programing challenge website
- https://www.topcoder.com/challenges
- https://www.hackerrank.com
- https://codefights.com
- https://www.codingame.com
- https://www.halite.io
- https://www.codewars.com
- https://projecteuler.net
- https://leetcode.com
- https://www.codechef.com
- https://www.hackerearth.com
- https://practity.com
- https://coderbyte.com
- https://www.codeabbey.com
- https://www.spoj.com
- https://codingbat.com
- https://dmoj.ca
- https://open.kattis.com
- https://exercism.io
- https://screeps.com
- http://rosalind.info
- https://reddit.com/r/dailyprogrammer
- https://www.geeksforgeeks.org
- https://codesignal.com
- https://perlweeklychallenge.org
- https://adventofcode.com
- https://www.dailycodingproblem.com
- http://www.4clojure.com
- https://www.thehuxley.com
- https://www.firecode.io
- https://edabit.com
List of Topic and corresponding leetcode questions
Arrays
Easy:
- Contains Duplicate: https://leetcode.com/problems/contains-duplicate/
- Missing Number: https://leetcode.com/problems/missing-number/
- Find All Numbers Disappeared in an Array: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/
- Single Number: https://leetcode.com/problems/single-number/
Medium:
- Product of Array Except Self: https://leetcode.com/problems/product-of-array-except-self/
- Find the Duplicate Number: https://leetcode.com/problems/find-the-duplicate-number/
- Find All Duplicates in an Array: https://leetcode.com/problems/find-all-duplicates-in-an-array/
Hard:
- First Missing Positive: https://leetcode.com/problems/first-missing-positive/
- Longest Consecutive Sequence: https://leetcode.com/problems/longest-consecutive-sequence/
Backtracking
Easy:
- Letter Case Permutation: https://leetcode.com/problems/letter-case-permutation/
Medium:
- Subsets: https://leetcode.com/problems/subsets/
- Subsets II: https://leetcode.com/problems/subsets-ii/
- Permutations: https://leetcode.com/problems/permutations/
- Permutations II: https://leetcode.com/problems/permutations-ii/
- Combinations: https://leetcode.com/problems/combinations/
- Combination Sum: https://leetcode.com/problems/combination-sum/
- Combination Sum II: https://leetcode.com/problems/combination-sum-ii/
- Combination Sum III: https://leetcode.com/problems/combination-sum-iii/
- Generate Parentheses: https://leetcode.com/problems/generate-parentheses/
- Target Sum: https://leetcode.com/problems/target-sum/
- Palindrome Partitioning: https://leetcode.com/problems/palindrome-partitioning/
- Partition to K Equal Sum Subsets: https://leetcode.com/problems/partition-to-k-equal-sum-subsets/
- Letter Combinations of a Phone Number: https://leetcode.com/problems/letter-combinations-of-a-phone-number/
- Generalized Abbreviation: https://leetcode.com/problems/generalized-abbreviation/
Hard:
- Sudoku Solver: https://leetcode.com/problems/sudoku-solver/
- N-Queens: https://leetcode.com/problems/n-queens/
Dynamic Programming
Easy:
- Climbing Stairs: https://leetcode.com/problems/climbing-stairs/
- House Robber: https://leetcode.com/problems/house-robber/
- Best Time to Buy and Sell Stock: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
- Maximum Subarray: https://leetcode.com/problems/maximum-subarray/
- Range Sum Query - Immutable: https://leetcode.com/problems/range-sum-query-immutable/
Medium:
- House Robber II: https://leetcode.com/problems/house-robber-ii/
- Coin Change: https://leetcode.com/problems/coin-change/
- Maximum Product Subarray: https://leetcode.com/problems/maximum-product-subarray/
- Longest Increasing Subsequence: https://leetcode.com/problems/longest-increasing-subsequence/
- Longest Palindromic Substring: https://leetcode.com/problems/longest-palindromic-substring/
- Word Break: https://leetcode.com/problems/word-break/
- Combination Sum: https://leetcode.com/problems/combination-sum-iv/
- Decode Ways: https://leetcode.com/problems/decode-ways/
- Unique Paths: https://leetcode.com/problems/unique-paths/
- Palindromic Substrings: https://leetcode.com/problems/palindromic-substrings/
- Number of Longest Increasing Subsequence: https://leetcode.com/problems/number-of-longest-increasing-subsequence/
- Partition Equal Subset Sum: https://leetcode.com/problems/partition-equal-subset-sum/
- Best Time to Buy and Sell Stock with Cooldown: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
- Counting Bits: https://leetcode.com/problems/counting-bits/
Hard:
- Longest Valid Parentheses: https://leetcode.com/problems/longest-valid-parentheses/
Fast & Slow Pointers
Easy:
- Linked List Cycle: https://leetcode.com/problems/linked-list-cycle/
- Middle of the Linked List: https://leetcode.com/problems/middle-of-the-linked-list/
- Palindrome Linked List: https://leetcode.com/problems/palindrome-linked-list/
- Remove Linked List Elements: https://leetcode.com/problems/remove-linked-list-elements/
- Remove Duplicates from Sorted List: https://leetcode.com/problems/remove-duplicates-from-sorted-list/
Medium:
- Linked List Cycle II: https://leetcode.com/problems/linked-list-cycle-ii/
- Add Two Numbers: https://leetcode.com/problems/add-two-numbers/
- Remove Nth Node From End Of List: https://leetcode.com/problems/remove-nth-node-from-end-of-list/
- Sort List: https://leetcode.com/problems/sort-list/
- Reorder List: https://leetcode.com/problems/reorder-list/
Graph Traversals
Medium:
- Clone Graph: https://leetcode.com/problems/clone-graph/
- Course Schedule: https://leetcode.com/problems/course-schedule/
- Pacific Atlantic Water Flow: https://leetcode.com/problems/pacific-atlantic-water-flow/
- Number of Islands: https://leetcode.com/problems/number-of-islands/
- Graph Valid Tree: https://leetcode.com/problems/graph-valid-tree/
- 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:
- Reverse Linked List: https://leetcode.com/problems/reverse-linked-list/
Medium:
- Reverse Linked List II: https://leetcode.com/problems/reverse-linked-list-ii/
- Rotate List: https://leetcode.com/problems/rotate-list/
- Swap Nodes in Pairs: https://leetcode.com/problems/swap-nodes-in-pairs/
- Odd Even Linked List: https://leetcode.com/problems/odd-even-linked-list/
Hard:
- Reverse Nodes in k-Group: https://leetcode.com/problems/reverse-nodes-in-k-group/
K-Way Merge
Easy:
- Merge Two Sorted Lists: https://leetcode.com/problems/merge-two-sorted-lists/
Hard:
- Merge k Sorted Lists: https://leetcode.com/problems/merge-k-sorted-lists/
Matrices
Medium:
- Set Matrix Zeroes: https://leetcode.com/problems/set-matrix-zeroes/
- Spiral Matrix: https://leetcode.com/problems/spiral-matrix/
- Rotate Image: https://leetcode.com/problems/rotate-image/
- Word Search: https://leetcode.com/problems/word-search/
- Kth Smallest Element in a Sorted Matrix: https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/
Intervals
Easy:
- Meeting Rooms: https://leetcode.com/problems/meeting-rooms
Medium:
- Merge Intervals: https://leetcode.com/problems/merge-intervals/
- Interval List Intersections: https://leetcode.com/problems/interval-list-intersections/
- Non-overlapping Intervals: https://leetcode.com/problems/non-overlapping-intervals/
- Meeting Rooms II: https://leetcode.com/problems/meeting-rooms-ii/
- Task Scheduler: https://leetcode.com/problems/task-scheduler/
- Minimum Number of Arrows to Burst Balloons: https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons/
Hard:
- Insert Interval: https://leetcode.com/problems/insert-interval/
- Employee Free Time: https://leetcode.com/problems/employee-free-time/
Modified Binary Search
Easy:
- Binary Search: https://leetcode.com/problems/binary-search/
- Find Smallest Letter Greater Than Target: https://leetcode.com/problems/find-smallest-letter-greater-than-target/
- Peak Index in a Mountain Array: https://leetcode.com/problems/peak-index-in-a-mountain-array/
Medium:
- Find Minimum in Rotated Sorted Array: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/
- Find Peak Element: https://leetcode.com/problems/find-peak-element/
- Search in Rotated Sorted Array: https://leetcode.com/problems/search-in-rotated-sorted-array/
- Search in Rotated Sorted Array II: https://leetcode.com/problems/search-in-rotated-sorted-array-ii/
- Search a 2D Matrix: https://leetcode.com/problems/search-a-2d-matrix/
- Search a 2D Matrix II: https://leetcode.com/problems/search-a-2d-matrix-ii/
Hard:
- Count of Range Sum: https://leetcode.com/problems/count-of-range-sum/
Sliding Window
Medium:
- Minimum Size Subarray Sum: https://leetcode.com/problems/minimum-size-subarray-sum/
- Fruit Into Baskets: https://leetcode.com/problems/fruit-into-baskets/
- Permutation in String: https://leetcode.com/problems/permutation-in-string/
- Longest Repeating Character Replacement: https://leetcode.com/problems/longest-repeating-character-replacement/
- Longest Substring Without Repeating Characters: https://leetcode.com/problems/longest-substring-without-repeating-characters/
Hard:
- Sliding Window Maximum: https://leetcode.com/problems/sliding-window-maximum/
- Minimum Number of K Consecutive Bit Flips: https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/
- Unique Letter String: https://leetcode.com/problems/unique-letter-string/
- Substring with Concatenation of All Words: https://leetcode.com/problems/substring-with-concatenation-of-all-words/
Top 'K' Elements
Medium:
- Kth Smallest Element in a BST: https://leetcode.com/problems/kth-smallest-element-in-a-bst/
- K Closest Points to Origin: https://leetcode.com/problems/k-closest-points-to-origin/
- Top K Frequent Elements: https://leetcode.com/problems/top-k-frequent-elements/
- Sort Characters By Frequency: https://leetcode.com/problems/sort-characters-by-frequency/
- Kth Largest Element in an Array: https://leetcode.com/problems/kth-largest-element-in-an-array/
- Find K Closest Elements: https://leetcode.com/problems/find-k-closest-elements/
- Reorganize String: https://leetcode.com/problems/reorganize-string/
Hard:
- Rearrange String k Distance Apart: https://leetcode.com/problems/rearrange-string-k-distance-apart
- Course Schedule III: https://leetcode.com/problems/course-schedule-iii/
- Maximum Frequency Stack: https://leetcode.com/problems/maximum-frequency-stack/
Topological Sort
Medium:
- Course Schedule: https://leetcode.com/problems/course-schedule/
- Course Schedule II: https://leetcode.com/problems/course-schedule-ii/
- Minimum Height Trees: https://leetcode.com/problems/minimum-height-trees/
Hard:
- Alien Dictionary: https://leetcode.com/problems/alien-dictionary
- 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:
- Binary Tree Level Order Traversal II: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
- Average of Levels in Binary Tree: https://leetcode.com/problems/average-of-levels-in-binary-tree/
- Minimum Depth of Binary Tree: https://leetcode.com/problems/minimum-depth-of-binary-tree/
Medium:
- Binary Tree Level Order Traversal: https://leetcode.com/problems/binary-tree-level-order-traversal/
- Binary Tree Zigzag Level Order Traversal: https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
- Populating Next Right Pointers in Each Node: https://leetcode.com/problems/populating-next-right-pointers-in-each-node/
- Populating Next Right Pointers in Each Node II: https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/
- Binary Tree Right Side View: https://leetcode.com/problems/binary-tree-right-side-view/
- All Nodes Distance K in Binary Tree: https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/
- Boundary of Binary Tree: https://leetcode.com/problems/boundary-of-binary-tree
Tree Depth First Search
Easy:
- Same Tree: https://leetcode.com/problems/same-tree/
- Path Sum: https://leetcode.com/problems/path-sum/
- Diameter of Binary Tree: https://leetcode.com/problems/diameter-of-binary-tree/
- Merge Two Binary Trees: https://leetcode.com/problems/merge-two-binary-trees/
- Maximum Depth of Binary Tree: https://leetcode.com/problems/maximum-depth-of-binary-tree/
- Lowest Common Ancestor of a Binary Search Tree: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
- Subtree of Another Tree: https://leetcode.com/problems/subtree-of-another-tree/
- Invert Binary Tree: https://leetcode.com/problems/invert-binary-tree/
Medium:
- Path Sum II: https://leetcode.com/problems/path-sum-ii/
- Path Sum III: https://leetcode.com/problems/path-sum-iii/
- Lowest Common Ancestor of a Binary Tree: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
- Maximum Binary Tree: https://leetcode.com/problems/maximum-binary-tree/
- Maximum Width of Binary Tree: https://leetcode.com/problems/maximum-width-of-binary-tree/
- Construct Binary Tree from Preorder and Inorder Traversal: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
- Validate Binary Search Tree: https://leetcode.com/problems/validate-binary-search-tree/
- Kth Smallest Element in a BST: https://leetcode.com/problems/kth-smallest-element-in-a-bst/
- Implement Trie (Prefix Tree): https://leetcode.com/problems/implement-trie-prefix-tree/
Hard:
- Binary Tree Maximum Path Sum: https://leetcode.com/problems/binary-tree-maximum-path-sum/
- Serialize and Deserialize Binary Tree: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
- Word Search II: https://leetcode.com/problems/word-search-ii/
Two Heaps
Hard:
- Find Median from Data Stream: https://leetcode.com/problems/find-median-from-data-stream/
- Sliding Window Median: https://leetcode.com/problems/sliding-window-median/
- IPO: https://leetcode.com/problems/ipo/
Two Pointers
Easy:
- Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/
- Remove Duplicates from Sorted List: https://leetcode.com/problems/remove-duplicates-from-sorted-list/
- Squares of a Sorted Array: https://leetcode.com/problems/squares-of-a-sorted-array/
- Backspace String Compare: https://leetcode.com/problems/backspace-string-compare
Medium:
- 3 Sum: https://leetcode.com/problems/3sum/
- 3 Sum Closest: https://leetcode.com/problems/3sum-closest/
- Subarrays with Product Less than K: https://leetcode.com/problems/subarray-product-less-than-k/
- Sort Colours: https://leetcode.com/problems/sort-colors/
Hard:
- Minimum Window Substring: https://leetcode.com/problems/minimum-window-substring/
- Trapping Rain Water: https://leetcode.com/problems/trapping-rain-water/
- Container With Most Water: https://leetcode.com/problems/container-with-most-water/
Comments: 0