DS-Algo-Interview-Questions
DS-Algo-Interview-Questions copied to clipboard
Collection of some important questions asked in job interviews.
Data Structure Algorithms Interview Questions
Collection of some important questions asked in job interviews.
Array
- https://leetcode.com/problems/3sum/ [SOLUTION]
- https://leetcode.com/problems/trapping-rain-water/ [SOLUTION]
- https://leetcode.com/problems/move-zeroes/
- https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
- https://leetcode.com/problems/maximum-subarray/
- https://leetcode.com/problems/first-missing-positive/
- https://leetcode.com/problems/container-with-most-water/
- https://leetcode.com/problems/product-of-array-except-self
Bit Manipulation
- https://leetcode.com/problems/single-number/
- https://leetcode.com/problems/counting-bits/
- https://www.geeksforgeeks.org/minimum-xor-value-pair/
- https://leetcode.com/problems/subsets/
- https://www.interviewbit.com/problems/count-of-rectangles-with-area-less-than-the-given-number/
- https://www.interviewbit.com/problems/divide-integers/
- https://www.interviewbit.com/problems/reverse-bits/
- https://www.interviewbit.com/problems/different-bits-sum-pairwise/
- https://leetcode.com/problems/bitwise-and-of-numbers-range/
Math
- https://www.interviewbit.com/problems/prime-numbers/
- https://leetcode.com/problems/palindrome-number/
- https://leetcode.com/problems/add-binary/
- https://leetcode.com/problems/happy-number/
- https://www.interviewbit.com/problems/implement-power-function/
- https://leetcode.com/problems/max-points-on-a-line/
- https://leetcode.com/problems/factorial-trailing-zeroes/
- https://www.interviewbit.com/problems/excel-column-number/
- https://www.interviewbit.com/problems/greatest-common-divisor/
- https://www.interviewbit.com/problems/largest-coprime-divisor/
- https://www.interviewbit.com/problems/excel-column-title/
Search
- https://leetcode.com/problems/search-in-rotated-sorted-array/
- https://www.geeksforgeeks.org/find-the-row-with-maximum-number-1s/
- https://leetcode.com/problems/search-a-2d-matrix-ii/
- https://leetcode.com/problems/find-peak-element/
- https://leetcode.com/problems/smallest-good-base/
- https://www.interviewbit.com/problems/matrix-median/
- https://www.interviewbit.com/problems/aggressive-cows/
- https://leetcode.com/problems/sqrtx/
- https://leetcode.com/problems/minimum-size-subarray-sum/
BackTracking
- https://leetcode.com/problems/n-queens/
- https://www.interviewbit.com/problems/kth-permutation-sequence/
- https://www.interviewbit.com/problems/unique-paths-iii/
- https://leetcode.com/problems/palindrome-partitioning/
- https://www.interviewbit.com/problems/gray-code/
- https://www.interviewbit.com/problems/combination-sum-ii/
Sorting
- https://leetcode.com/problems/count-of-smaller-numbers-after-self/
- https://leetcode.com/problems/merge-intervals/
- https://www.interviewbit.com/problems/gcd-ordering/
- https://www.geeksforgeeks.org/counting-inversions/
- https://leetcode.com/problems/wiggle-sort-ii/
- https://leetcode.com/problems/maximum-gap/
Hashing
- https://leetcode.com/problems/longest-substring-without-repeating-characters/
- https://www.interviewbit.com/problems/largest-continuous-sequence-zero-sum/
- https://leetcode.com/problems/copy-list-with-random-pointer/
- https://leetcode.com/problems/longest-consecutive-sequence/
- https://leetcode.com/problems/minimum-window-substring/
- https://leetcode.com/problems/isomorphic-strings/
Strings
- https://leetcode.com/problems/longest-palindromic-substring/
- https://leetcode.com/problems/longest-common-prefix/
- https://www.interviewbit.com/problems/minimum-characters-required-to-make-a-string-palindromic/
- https://leetcode.com/problems/count-and-say/
- https://www.geeksforgeeks.org/check-two-expressions-brackets/
- https://leetcode.com/problems/zigzag-conversion/
Stack & Queue
- https://leetcode.com/problems/valid-parentheses/
- https://leetcode.com/problems/min-stack/
- https://leetcode.com/problems/remove-duplicate-letters/
- https://www.interviewbit.com/problems/nearest-smaller-element/
- https://leetcode.com/problems/sliding-window-maximum/
- https://www.interviewbit.com/problems/gas-station/
- https://www.interviewbit.com/problems/reverse-a-stack-using-recursion/
- https://leetcode.com/problems/largest-rectangle-in-histogram/
- https://www.interviewbit.com/problems/first-non-repeating-character-in-a-stream-of-characters/
Linked List
- https://leetcode.com/problems/merge-two-sorted-lists/
- https://www.geeksforgeeks.org/convert-given-binary-tree-doubly-linked-list-set-3/
- https://www.geeksforgeeks.org/flatten-a-linked-list-with-next-and-child-pointers/
- https://leetcode.com/problems/copy-list-with-random-pointer/
- https://leetcode.com/problems/add-two-numbers/
- https://leetcode.com/problems/reverse-linked-list/
- https://leetcode.com/problems/linked-list-cycle/
- https://leetcode.com/problems/palindrome-linked-list/
Trees
- https://leetcode.com/problems/binary-tree-level-order-traversal/
- https://leetcode.com/problems/binary-tree-preorder-traversal/
- https://leetcode.com/problems/binary-tree-postorder-traversal/
- https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
- https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/
- https://leetcode.com/problems/path-sum-ii/
- https://leetcode.com/problems/binary-tree-maximum-path-sum/
- https://www.interviewbit.com/problems/balanced-binary-tree/
- https://www.interviewbit.com/problems/least-common-ancestor/
Binary Search Tree
- https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/
- https://leetcode.com/problems/validate-binary-search-tree/
- https://www.interviewbit.com/problems/remove-nodes-from-path-sum-less-than-b/
- https://leetcode.com/problems/merge-two-binary-trees/
- https://www.interviewbit.com/problems/2sum-binary-tree/
- https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
- https://www.interviewbit.com/problems/next-greater-number-bst/
- https://www.interviewbit.com/problems/recover-binary-search-tree/
Heaps
- https://www.interviewbit.com/problems/median-of-stream-of-running-integers/
- https://www.interviewbit.com/problems/minimum-number-of-refueling-stops/
- https://www.geeksforgeeks.org/kth-smallest-element-after-every-insertion/
- https://www.interviewbit.com/problems/ways-to-form-max-heap/
- https://www.interviewbit.com/problems/magician-and-chocolates/
- https://leetcode.com/problems/merge-k-sorted-lists/
- https://leetcode.com/problems/ugly-number-ii/
Greedy
- https://www.interviewbit.com/problems/maximum-array-sum-after-b-negations/
- https://www.interviewbit.com/problems/assign-mice-to-holes/
- https://www.interviewbit.com/problems/seats/
- https://www.interviewbit.com/problems/meeting-rooms/
- https://www.interviewbit.com/problems/activity-selection/
- https://leetcode.com/problems/minimum-number-of-k-consecutive-bit-flips/
- https://www.interviewbit.com/problems/distribute-candy/
- https://www.interviewbit.com/problems/gas-station/
Dynamic Programming
- https://leetcode.com/problems/regular-expression-matching/
- https://www.interviewbit.com/problems/rod-cutting/
- https://leetcode.com/problems/unique-binary-search-trees/
- https://www.interviewbit.com/problems/min-jumps-array/
- https://www.interviewbit.com/problems/tushars-birthday-bombs/
- https://www.interviewbit.com/problems/largest-area-of-rectangle-with-permutations/
- https://www.interviewbit.com/problems/max-sum-without-adjacent-elements/
- https://www.interviewbit.com/problems/stairs/
- https://leetcode.com/problems/minimum-path-sum/
- https://www.interviewbit.com/problems/compute-ncr-m/