Skip to content

anjanaouseph/Data-Structures-And-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0015-3sum
0033-search-in-rotated-sorted-array
0036-valid-sudoku
0042-trapping-rain-water
0046-permutations
0049-group-anagrams
0056-merge-intervals
0074-search-a-2d-matrix
0078-subsets
0084-largest-rectangle-in-histogram
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0130-surrounded-regions
0150-evaluate-reverse-polish-notation
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0200-number-of-islands
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0238-product-of-array-except-self
0239-sliding-window-maximum
0271-encode-and-decode-strings
0286-walls-and-gates
0287-find-the-duplicate-number
0347-top-k-frequent-elements
0417-pacific-atlantic-water-flow
0560-subarray-sum-equals-k
0695-max-area-of-island
0739-daily-temperatures
0792-binary-search
0883-car-fleet
0907-koko-eating-bananas
0912-random-pick-with-weight
1006-vowel-spellchecker
1014-k-closest-points-to-origin
1028-interval-list-intersections
1036-rotting-oranges
1046-max-consecutive-ones-iii
1171-shortest-path-in-binary-matrix
1713-dot-product-of-two-sparse-vectors
1909-buildings-with-an-ocean-view

Two Pointers

0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0567-permutation-in-string
0680-valid-palindrome-ii
1028-interval-list-intersections
1713-dot-product-of-two-sparse-vectors
1790-lowest-common-ancestor-of-a-binary-tree-iii

Greedy

0011-container-with-most-water
0680-valid-palindrome-ii
0957-minimum-add-to-make-parentheses-valid

Dynamic Programming

0022-generate-parentheses
0042-trapping-rain-water
0121-best-time-to-buy-and-sell-stock
0124-binary-tree-maximum-path-sum

Stack

0020-valid-parentheses
0042-trapping-rain-water
0071-simplify-path
0084-largest-rectangle-in-histogram
0143-reorder-list
0150-evaluate-reverse-polish-notation
0155-min-stack
0227-basic-calculator-ii
0739-daily-temperatures
0883-car-fleet
0957-minimum-add-to-make-parentheses-valid
1371-minimum-remove-to-make-valid-parentheses
1909-buildings-with-an-ocean-view

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0739-daily-temperatures
0883-car-fleet
1909-buildings-with-an-ocean-view

String

0003-longest-substring-without-repeating-characters
0020-valid-parentheses
0022-generate-parentheses
0049-group-anagrams
0071-simplify-path
0076-minimum-window-substring
0125-valid-palindrome
0127-word-ladder
0227-basic-calculator-ii
0242-valid-anagram
0271-encode-and-decode-strings
0297-serialize-and-deserialize-binary-tree
0424-longest-repeating-character-replacement
0567-permutation-in-string
0680-valid-palindrome-ii
0807-custom-sort-string
0957-minimum-add-to-make-parentheses-valid
1006-vowel-spellchecker
1023-time-based-key-value-store
1371-minimum-remove-to-make-valid-parentheses

Design

0146-lru-cache
0155-min-stack
0271-encode-and-decode-strings
0297-serialize-and-deserialize-binary-tree
0789-kth-largest-element-in-a-stream
1023-time-based-key-value-store
1713-dot-product-of-two-sparse-vectors

Math

0002-add-two-numbers
0050-powx-n
0150-evaluate-reverse-polish-notation
0227-basic-calculator-ii
0912-random-pick-with-weight
1014-k-closest-points-to-origin

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0314-binary-tree-vertical-order-traversal
0347-top-k-frequent-elements
0807-custom-sort-string
0883-car-fleet
1014-k-closest-points-to-origin

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0792-binary-search
0907-koko-eating-bananas
0912-random-pick-with-weight
1023-time-based-key-value-store
1046-max-consecutive-ones-iii

Matrix

0036-valid-sudoku
0074-search-a-2d-matrix
0130-surrounded-regions
0200-number-of-islands
0286-walls-and-gates
0417-pacific-atlantic-water-flow
0695-max-area-of-island
1036-rotting-oranges
1171-shortest-path-in-binary-matrix

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0036-valid-sudoku
0049-group-anagrams
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0127-word-ladder
0128-longest-consecutive-sequence
0133-clone-graph
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0146-lru-cache
0217-contains-duplicate
0242-valid-anagram
0314-binary-tree-vertical-order-traversal
0347-top-k-frequent-elements
0424-longest-repeating-character-replacement
0560-subarray-sum-equals-k
0567-permutation-in-string
0807-custom-sort-string
1006-vowel-spellchecker
1023-time-based-key-value-store
1713-dot-product-of-two-sparse-vectors
1790-lowest-common-ancestor-of-a-binary-tree-iii

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0567-permutation-in-string
1046-max-consecutive-ones-iii

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0143-reorder-list
0146-lru-cache
0206-reverse-linked-list

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0050-powx-n
0143-reorder-list
0206-reverse-linked-list

Bit Manipulation

0078-subsets
0287-find-the-duplicate-number

Doubly-Linked List

0146-lru-cache

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0239-sliding-window-maximum
0347-top-k-frequent-elements
0789-kth-largest-element-in-a-stream
1014-k-closest-points-to-origin

Merge Sort

0023-merge-k-sorted-lists

Tree

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
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0789-kth-largest-element-in-a-stream
1091-maximum-average-subtree
1544-count-good-nodes-in-binary-tree
1790-lowest-common-ancestor-of-a-binary-tree-iii
2126-count-nodes-equal-to-sum-of-descendants
2347-count-nodes-equal-to-average-of-subtree

Depth-First Search

0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0261-graph-valid-tree
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0323-number-of-connected-components-in-an-undirected-graph
0339-nested-list-weight-sum
0417-pacific-atlantic-water-flow
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0684-redundant-connection
0695-max-area-of-island
1091-maximum-average-subtree
1544-count-good-nodes-in-binary-tree
2126-count-nodes-equal-to-sum-of-descendants
2347-count-nodes-equal-to-average-of-subtree

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0127-word-ladder
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0261-graph-valid-tree
0286-walls-and-gates
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0323-number-of-connected-components-in-an-undirected-graph
0339-nested-list-weight-sum
0417-pacific-atlantic-water-flow
0684-redundant-connection
0695-max-area-of-island
1036-rotting-oranges
1171-shortest-path-in-binary-matrix
1544-count-good-nodes-in-binary-tree

Binary Tree

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
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0789-kth-largest-element-in-a-stream
1091-maximum-average-subtree
1544-count-good-nodes-in-binary-tree
1790-lowest-common-ancestor-of-a-binary-tree-iii
2126-count-nodes-equal-to-sum-of-descendants
2347-count-nodes-equal-to-average-of-subtree

String Matching

0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

Binary Search Tree

0098-validate-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0789-kth-largest-element-in-a-stream

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph
0684-redundant-connection
0695-max-area-of-island

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph
0684-redundant-connection

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Prefix Sum

0238-product-of-array-except-self
0560-subarray-sum-equals-k
0912-random-pick-with-weight
1046-max-consecutive-ones-iii

Randomized

0912-random-pick-with-weight

Bucket Sort

0347-top-k-frequent-elements

Counting

0347-top-k-frequent-elements

Geometry

1014-k-closest-points-to-origin

Line Sweep

1028-interval-list-intersections

Backtracking

0022-generate-parentheses
0046-permutations
0078-subsets

Topological Sort

0207-course-schedule
0210-course-schedule-ii

Data Stream

0789-kth-largest-element-in-a-stream

Queue

0239-sliding-window-maximum

Monotonic Queue

0239-sliding-window-maximum

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages