Skip to content

LeetCode Solutions: A Record of My Problem Solving Journey.

Notifications You must be signed in to change notification settings

riteshakya037/leet-code-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Two Pointers

0647-palindromic-substrings
0142-linked-list-cycle-ii
0019-remove-nth-node-from-end-of-list
0148-sort-list
0633-sum-of-square-numbers
0853-most-profit-assigning-work
0143-reorder-list

String

0647-palindromic-substrings

Dynamic Programming

0309-best-time-to-buy-and-sell-stock-with-cooldown
0416-partition-equal-subset-sum
0647-palindromic-substrings
0673-number-of-longest-increasing-subsequence
0698-partition-to-k-equal-sum-subsets

Array

0309-best-time-to-buy-and-sell-stock-with-cooldown
0330-patching-array
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0502-ipo
0673-number-of-longest-increasing-subsequence
0698-partition-to-k-equal-sum-subsets
0853-most-profit-assigning-work
0982-minimum-increment-to-make-array-unique
1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls

Binary Indexed Tree

0673-number-of-longest-increasing-subsequence

Segment Tree

0673-number-of-longest-increasing-subsequence

Backtracking

0698-partition-to-k-equal-sum-subsets

Bit Manipulation

0698-partition-to-k-equal-sum-subsets
1037-minimum-number-of-k-consecutive-bit-flips

Memoization

0698-partition-to-k-equal-sum-subsets

Bitmask

0698-partition-to-k-equal-sum-subsets

Hash Table

0142-linked-list-cycle-ii
1370-count-number-of-nice-subarrays

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0142-linked-list-cycle-ii
0143-reorder-list
0148-sort-list

Math

0002-add-two-numbers
0633-sum-of-square-numbers
1370-count-number-of-nice-subarrays

Recursion

0002-add-two-numbers
0143-reorder-list

Greedy

0330-patching-array
0502-ipo
0853-most-profit-assigning-work
0982-minimum-increment-to-make-array-unique
1285-balance-a-binary-search-tree
2379-maximum-total-importance-of-roads

Sorting

0148-sort-list
0502-ipo
0853-most-profit-assigning-work
0982-minimum-increment-to-make-array-unique
1675-magnetic-force-between-two-balls
2379-maximum-total-importance-of-roads

Counting

0982-minimum-increment-to-make-array-unique

Heap (Priority Queue)

0502-ipo
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
2379-maximum-total-importance-of-roads

Divide and Conquer

0148-sort-list
1285-balance-a-binary-search-tree

Merge Sort

0148-sort-list

Binary Search

0633-sum-of-square-numbers
0853-most-profit-assigning-work
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls

Sliding Window

1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Queue

1037-minimum-number-of-k-consecutive-bit-flips
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Ordered Set

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Monotonic Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Stack

0143-reorder-list

Prefix Sum

1037-minimum-number-of-k-consecutive-bit-flips

Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Depth-First Search

0417-pacific-atlantic-water-flow
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Search Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Graph

1916-find-center-of-star-graph
2379-maximum-total-importance-of-roads

Breadth-First Search

0417-pacific-atlantic-water-flow

Matrix

0417-pacific-atlantic-water-flow

LeetCode Topics

Depth-First Search

0200-number-of-islands
1207-delete-nodes-and-return-forest
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Breadth-First Search

0200-number-of-islands
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph

Graph

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
2472-build-a-matrix-with-conditions
3235-minimum-cost-to-convert-string-i

Topological Sort

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2472-build-a-matrix-with-conditions

Array

0056-merge-intervals
0200-number-of-islands
0350-intersection-of-two-arrays-ii
0373-find-k-pairs-with-smallest-sums
0378-kth-smallest-element-in-a-sorted-matrix
0435-non-overlapping-intervals
0621-task-scheduler
0948-sort-an-array
1028-interval-list-intersections
1207-delete-nodes-and-return-forest
1293-three-consecutive-odds
1333-sort-the-jumbled-numbers
1496-lucky-numbers-in-a-matrix
1511-count-number-of-teams
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2472-build-a-matrix-with-conditions
2502-sort-the-people
2846-robot-collisions
3235-minimum-cost-to-convert-string-i

Union Find

0200-number-of-islands
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable

Matrix

0200-number-of-islands
0378-kth-smallest-element-in-a-sorted-matrix
1496-lucky-numbers-in-a-matrix
1711-find-valid-matrix-given-row-and-column-sums
2472-build-a-matrix-with-conditions

Math

1642-water-bottles
1951-find-the-winner-of-the-circular-game

Simulation

1642-water-bottles
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2299-merge-nodes-in-between-zeros
2846-robot-collisions

Linked List

0024-swap-nodes-in-pairs
0061-rotate-list
0092-reverse-linked-list-ii
0328-odd-even-linked-list
2299-merge-nodes-in-between-zeros

Hash Table

0350-intersection-of-two-arrays-ii
0621-task-scheduler
0726-number-of-atoms
1207-delete-nodes-and-return-forest
1741-sort-array-by-increasing-frequency
2502-sort-the-people

Two Pointers

0061-rotate-list
0350-intersection-of-two-arrays-ii
1028-interval-list-intersections

Binary Search

0350-intersection-of-two-arrays-ii
0378-kth-smallest-element-in-a-sorted-matrix

Sorting

0056-merge-intervals
0350-intersection-of-two-arrays-ii
0378-kth-smallest-element-in-a-sorted-matrix
0435-non-overlapping-intervals
0621-task-scheduler
0726-number-of-atoms
0948-sort-an-array
1333-sort-the-jumbled-numbers
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1741-sort-array-by-increasing-frequency
2502-sort-the-people
2846-robot-collisions

Greedy

0435-non-overlapping-intervals
0621-task-scheduler
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums

Recursion

0024-swap-nodes-in-pairs
1951-find-the-winner-of-the-circular-game

Queue

1951-find-the-winner-of-the-circular-game

String

0726-number-of-atoms
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2502-sort-the-people
3235-minimum-cost-to-convert-string-i

Stack

0726-number-of-atoms
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
2846-robot-collisions

Heap (Priority Queue)

0373-find-k-pairs-with-smallest-sums
0378-kth-smallest-element-in-a-sorted-matrix
0621-task-scheduler
0948-sort-an-array

Tree

1207-delete-nodes-and-return-forest
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Binary Tree

1207-delete-nodes-and-return-forest
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Dynamic Programming

0435-non-overlapping-intervals
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams

Counting

0621-task-scheduler

Divide and Conquer

0948-sort-an-array

Merge Sort

0948-sort-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array

Shortest Path

1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
3235-minimum-cost-to-convert-string-i

Binary Indexed Tree

1511-count-number-of-teams

About

LeetCode Solutions: A Record of My Problem Solving Journey.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages