Skip to content

gaurav1800/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Array

0011-container-with-most-water
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0042-trapping-rain-water
0045-jump-game-ii
0048-rotate-image
0049-group-anagrams
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0063-unique-paths-ii
0064-minimum-path-sum
0068-text-justification
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0118-pascals-triangle
0119-pascals-triangle-ii
0120-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0134-gas-station
0135-candy
0150-evaluate-reverse-polish-notation
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0219-contains-duplicate-ii
0238-product-of-array-except-self
0239-sliding-window-maximum
0274-h-index
0289-game-of-life
0300-longest-increasing-subsequence
0322-coin-change
0347-top-k-frequent-elements
0380-insert-delete-getrandom-o1
0494-target-sum
1106-escape-a-large-maze
1127-last-stone-weight
2015-determine-whether-matrix-can-be-obtained-by-rotation

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0042-trapping-rain-water
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0096-unique-binary-search-trees
0118-pascals-triangle
0119-pascals-triangle-ii
0120-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0198-house-robber
0213-house-robber-ii
0241-different-ways-to-add-parentheses
0279-perfect-squares
0300-longest-increasing-subsequence
0322-coin-change
0338-counting-bits
0392-is-subsequence
0494-target-sum
1013-fibonacci-number

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0133-clone-graph
0200-number-of-islands
0226-invert-binary-tree
0279-perfect-squares
0322-coin-change
0653-two-sum-iv-input-is-a-bst
1106-escape-a-large-maze

Math

0002-add-two-numbers
0013-roman-to-integer
0048-rotate-image
0050-powx-n
0062-unique-paths
0070-climbing-stairs
0096-unique-binary-search-trees
0150-evaluate-reverse-polish-notation
0189-rotate-array
0231-power-of-two
0241-different-ways-to-add-parentheses
0279-perfect-squares
0326-power-of-three
0342-power-of-four
0380-insert-delete-getrandom-o1
0390-elimination-game
1013-fibonacci-number

Combinatorics

0062-unique-paths

Queue

0232-implement-queue-using-stacks
0239-sliding-window-maximum

Sliding Window

0003-longest-substring-without-repeating-characters
0030-substring-with-concatenation-of-all-words
0076-minimum-window-substring
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0239-sliding-window-maximum

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0239-sliding-window-maximum
0347-top-k-frequent-elements
0451-sort-characters-by-frequency
1127-last-stone-weight

Monotonic Queue

0239-sliding-window-maximum

Binary Search

0074-search-a-2d-matrix
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0300-longest-increasing-subsequence

Matrix

0048-rotate-image
0054-spiral-matrix
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0200-number-of-islands
0289-game-of-life
2015-determine-whether-matrix-can-be-obtained-by-rotation

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0088-merge-sorted-array
0169-majority-element
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0274-h-index
0347-top-k-frequent-elements
0451-sort-characters-by-frequency

Tree

0094-binary-tree-inorder-traversal
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0653-two-sum-iv-input-is-a-bst
0775-n-ary-tree-preorder-traversal

Binary Tree

0094-binary-tree-inorder-traversal
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0653-two-sum-iv-input-is-a-bst

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0133-clone-graph
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0200-number-of-islands
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0653-two-sum-iv-input-is-a-bst
0775-n-ary-tree-preorder-traversal
1106-escape-a-large-maze

Binary Search Tree

0096-unique-binary-search-trees
0098-validate-binary-search-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0653-two-sum-iv-input-is-a-bst

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0042-trapping-rain-water
0061-rotate-list
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0234-palindrome-linked-list
0392-is-subsequence
0653-two-sum-iv-input-is-a-bst

Stack

0020-valid-parentheses
0042-trapping-rain-water
0071-simplify-path
0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0143-reorder-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0155-min-stack
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0394-decode-string
0775-n-ary-tree-preorder-traversal
2573-remove-nodes-from-linked-list

Monotonic Stack

0042-trapping-rain-water
2573-remove-nodes-from-linked-list

Hash Table

0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0030-substring-with-concatenation-of-all-words
0049-group-anagrams
0073-set-matrix-zeroes
0076-minimum-window-substring
0128-longest-consecutive-sequence
0133-clone-graph
0141-linked-list-cycle
0169-majority-element
0205-isomorphic-strings
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0290-word-pattern
0347-top-k-frequent-elements
0380-insert-delete-getrandom-o1
0383-ransom-note
0451-sort-characters-by-frequency
0653-two-sum-iv-input-is-a-bst
1106-escape-a-large-maze

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0006-zigzag-conversion
0013-roman-to-integer
0014-longest-common-prefix
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0030-substring-with-concatenation-of-all-words
0049-group-anagrams
0058-length-of-last-word
0068-text-justification
0071-simplify-path
0072-edit-distance
0076-minimum-window-substring
0125-valid-palindrome
0151-reverse-words-in-a-string
0205-isomorphic-strings
0241-different-ways-to-add-parentheses
0242-valid-anagram
0290-word-pattern
0383-ransom-note
0392-is-subsequence
0394-decode-string
0451-sort-characters-by-frequency

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0024-swap-nodes-in-pairs
0061-rotate-list
0114-flatten-binary-tree-to-linked-list
0141-linked-list-cycle
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
2573-remove-nodes-from-linked-list

Divide and Conquer

0023-merge-k-sorted-lists
0053-maximum-subarray
0169-majority-element
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements

Bucket Sort

0347-top-k-frequent-elements
0451-sort-characters-by-frequency

Counting

0169-majority-element
0347-top-k-frequent-elements
0383-ransom-note
0451-sort-characters-by-frequency

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0134-gas-station
0135-candy

Union Find

0128-longest-consecutive-sequence
0200-number-of-islands

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0024-swap-nodes-in-pairs
0050-powx-n
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0241-different-ways-to-add-parentheses
0326-power-of-three
0342-power-of-four
0390-elimination-game
0394-decode-string
1013-fibonacci-number
2573-remove-nodes-from-linked-list

Design

0155-min-stack
0232-implement-queue-using-stacks
0380-insert-delete-getrandom-o1

Merge Sort

0023-merge-k-sorted-lists

Graph

0133-clone-graph
1916-find-center-of-star-graph

Backtracking

0022-generate-parentheses
0494-target-sum

Memoization

0070-climbing-stairs
0241-different-ways-to-add-parentheses
1013-fibonacci-number

Bit Manipulation

0231-power-of-two
0338-counting-bits
0342-power-of-four

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self

Trie

0014-longest-common-prefix

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string

Simulation

0054-spiral-matrix
0068-text-justification
0289-game-of-life

Counting Sort

0274-h-index

Randomized

0380-insert-delete-getrandom-o1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published