Skip to content
tribhu05Public

About

Solutions and algorithmic patterns for LeetCode data structure and algorithm problems across arrays, trees, dynamic programming, and graphs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

375 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

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

LeetCode Topics

Two Pointers

0011-container-with-most-water
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0042-trapping-rain-water
0075-sort-colors
0088-merge-sorted-array
0151-reverse-words-in-a-string
0202-happy-number
0283-move-zeroes
1768-merge-strings-alternately

String

0013-roman-to-integer
0014-longest-common-prefix
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0049-group-anagrams
0058-length-of-last-word
0067-add-binary
0091-decode-ways
0127-word-ladder
0151-reverse-words-in-a-string
0726-number-of-atoms
1071-greatest-common-divisor-of-strings
1190-reverse-substrings-between-each-pair-of-parentheses
1456-maximum-number-of-vowels-in-a-substring-of-given-length
1614-maximum-nesting-depth-of-the-parentheses
1768-merge-strings-alternately
2409-count-days-spent-together
3498-reverse-degree-of-a-string

Array

0001-two-sum
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0035-search-insert-position
0042-trapping-rain-water
0048-rotate-image
0049-group-anagrams
0051-n-queens
0053-maximum-subarray
0066-plus-one
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0136-single-number
0153-find-minimum-in-rotated-sorted-array
0169-majority-element
0198-house-robber
0217-contains-duplicate
0238-product-of-array-except-self
0283-move-zeroes
0605-can-place-flowers
0739-daily-temperatures
0852-peak-index-in-a-mountain-array
0853-car-fleet
0875-koko-eating-bananas
1207-unique-number-of-occurrences
1464-maximum-product-of-two-elements-in-an-array
1732-find-the-highest-altitude
2089-find-target-indices-after-sorting-array
2091-removing-minimum-and-maximum-from-array
2215-find-the-difference-of-two-arrays
2965-find-missing-and-repeated-values
3420-count-non-decreasing-subarrays-after-k-operations
3693-climbing-stairs-ii
3736-minimum-moves-to-equal-array-elements-iii
3875-construct-uniform-parity-array-i
3942-minimum-operations-to-sort-a-permutation

Hash Table

0001-two-sum
0013-roman-to-integer
0049-group-anagrams
0127-word-ladder
0169-majority-element
0202-happy-number
0217-contains-duplicate
0726-number-of-atoms
1207-unique-number-of-occurrences
2215-find-the-difference-of-two-arrays
2965-find-missing-and-repeated-values

Math

0013-roman-to-integer
0029-divide-two-integers
0048-rotate-image
0050-powx-n
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0202-happy-number
0509-fibonacci-number
1071-greatest-common-divisor-of-strings
2409-count-days-spent-together
2965-find-missing-and-repeated-values
3736-minimum-moves-to-equal-array-elements-iii
3789-minimum-cost-to-acquire-required-items
3875-construct-uniform-parity-array-i

Matrix

0048-rotate-image
0074-search-a-2d-matrix
2965-find-missing-and-repeated-values

Recursion

0050-powx-n
0206-reverse-linked-list
0509-fibonacci-number

Euclidean Algorithm

1071-greatest-common-divisor-of-strings

Greatest Common Divisor

1071-greatest-common-divisor-of-strings

Greedy

0011-container-with-most-water
0605-can-place-flowers
2091-removing-minimum-and-maximum-from-array
3789-minimum-cost-to-acquire-required-items

Divide and Conquer

0053-maximum-subarray
0169-majority-element

Dynamic Programming

0042-trapping-rain-water
0053-maximum-subarray
0070-climbing-stairs
0091-decode-ways
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0198-house-robber
0509-fibonacci-number
3693-climbing-stairs-ii

Sorting

0015-3sum
0049-group-anagrams
0075-sort-colors
0088-merge-sorted-array
0169-majority-element
0217-contains-duplicate
0726-number-of-atoms
0853-car-fleet
1464-maximum-product-of-two-elements-in-an-array
2089-find-target-indices-after-sorting-array

Counting

0169-majority-element

Boyer–Moore Majority Vote Algorithm

0169-majority-element

Heap (Priority Queue)

1464-maximum-product-of-two-elements-in-an-array

Tree

0700-search-in-a-binary-search-tree

Binary Search Tree

0033-search-in-rotated-sorted-array
0035-search-insert-position
0069-sqrtx
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0700-search-in-a-binary-search-tree
0852-peak-index-in-a-mountain-array
0875-koko-eating-bananas
2089-find-target-indices-after-sorting-array

Binary Tree

0700-search-in-a-binary-search-tree

Prefix Sum

0238-product-of-array-except-self
1732-find-the-highest-altitude

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0726-number-of-atoms
0739-daily-temperatures
0853-car-fleet
1190-reverse-substrings-between-each-pair-of-parentheses
1614-maximum-nesting-depth-of-the-parentheses
3420-count-non-decreasing-subarrays-after-k-operations

Bracket Sequences

0020-valid-parentheses
1190-reverse-substrings-between-each-pair-of-parentheses
1614-maximum-nesting-depth-of-the-parentheses

Trie

0014-longest-common-prefix

Sliding Window

1456-maximum-number-of-vowels-in-a-substring-of-given-length
3420-count-non-decreasing-subarrays-after-k-operations

Breadth-First Search

0127-word-ladder

Bidirectional Search

0127-word-ladder

Ternary Search

0852-peak-index-in-a-mountain-array

Backtracking

0051-n-queens
0078-subsets

Algorithm X

0051-n-queens

Floyd's Cycle Finding Algorithm

0202-happy-number

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0739-daily-temperatures
0853-car-fleet
3420-count-non-decreasing-subarrays-after-k-operations

Linked List

0206-reverse-linked-list

Bit Manipulation

0029-divide-two-integers
0067-add-binary
0078-subsets
0136-single-number

Memoization

0070-climbing-stairs
0509-fibonacci-number

Simulation

0067-add-binary
3498-reverse-degree-of-a-string

Newton's Method

0069-sqrtx

Quicksort

0075-sort-colors

Bubble Sort

0075-sort-colors

String Matching

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

Z Algorithm

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

Knuth–Morris–Pratt Algorithm

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

Boyer–Moore String-Search Algorithm

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

Range Minimum/Maximum Query

0084-largest-rectangle-in-histogram

Segment Tree

3420-count-non-decreasing-subarrays-after-k-operations

Queue

3420-count-non-decreasing-subarrays-after-k-operations

Monotonic Queue

3420-count-non-decreasing-subarrays-after-k-operations

About

Solutions and algorithmic patterns for LeetCode data structure and algorithm problems across arrays, trees, dynamic programming, and graphs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages