Skip to content

Latest commit

 

History

History
325 lines (325 loc) · 29.7 KB

README.md

File metadata and controls

325 lines (325 loc) · 29.7 KB

A collection of LeetCode questions to ace the coding interview! - Created using LeetHub v2

LeetCode Topics

Linked List

0019-remove-nth-node-from-end-of-list
0024-swap-nodes-in-pairs
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0838-design-linked-list

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0652-find-duplicate-subtrees
0654-maximum-binary-tree
0669-trim-a-binary-search-tree
0764-n-ary-tree-level-order-traversal
0774-maximum-depth-of-n-ary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0652-find-duplicate-subtrees
0669-trim-a-binary-search-tree
0774-maximum-depth-of-n-ary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0107-binary-tree-level-order-traversal-ii
0111-minimum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0530-minimum-absolute-difference-in-bst
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0764-n-ary-tree-level-order-traversal
0774-maximum-depth-of-n-ary-tree

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0652-find-duplicate-subtrees
0654-maximum-binary-tree
0669-trim-a-binary-search-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree

Stack

0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0654-maximum-binary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0874-backspace-string-compare

Array

0026-remove-duplicates-from-sorted-array
0027-remove-element
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0049-group-anagrams
0054-spiral-matrix
0059-spiral-matrix-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0209-minimum-size-subarray-sum
0283-move-zeroes
0654-maximum-binary-tree
0792-binary-search
0940-fruit-into-baskets
1019-squares-of-a-sorted-array

Divide and Conquer

0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0654-maximum-binary-tree

Monotonic Stack

0654-maximum-binary-tree

Hash Table

0049-group-anagrams
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0242-valid-anagram
0383-ransom-note
0652-find-duplicate-subtrees
0940-fruit-into-baskets

String

0049-group-anagrams
0076-minimum-window-substring
0242-valid-anagram
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0383-ransom-note
0874-backspace-string-compare

Design

0297-serialize-and-deserialize-binary-tree
0838-design-linked-list

String Matching

0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

Binary Search

0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0209-minimum-size-subarray-sum
0222-count-complete-tree-nodes
0367-valid-perfect-square
0792-binary-search

Bit Manipulation

0222-count-complete-tree-nodes

Backtracking

0113-path-sum-ii
0257-binary-tree-paths

Binary Search Tree

0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0669-trim-a-binary-search-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree

Math

0069-sqrtx
0367-valid-perfect-square

Two Pointers

0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0283-move-zeroes
0874-backspace-string-compare
1019-squares-of-a-sorted-array

Simulation

0054-spiral-matrix
0059-spiral-matrix-ii
0874-backspace-string-compare

Sorting

0049-group-anagrams
0242-valid-anagram
1019-squares-of-a-sorted-array

Sliding Window

0076-minimum-window-substring
0209-minimum-size-subarray-sum
0940-fruit-into-baskets

Prefix Sum

0209-minimum-size-subarray-sum

Matrix

0054-spiral-matrix
0059-spiral-matrix-ii

Recursion

0024-swap-nodes-in-pairs
0203-remove-linked-list-elements
0206-reverse-linked-list

Counting

0383-ransom-note