/Leetcode

Collection of LeetCode questions to ace the coding interview!

Primary LanguageJava

Leetcode

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

Tree

0104-maximum-depth-of-binary-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Depth-First Search

0104-maximum-depth-of-binary-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Breadth-First Search

0104-maximum-depth-of-binary-tree

Binary Tree

0104-maximum-depth-of-binary-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Hash Table

0003-longest-substring-without-repeating-characters
0264-ugly-number-ii
0409-longest-palindrome

String

0003-longest-substring-without-repeating-characters
0058-length-of-last-word
0072-edit-distance
0409-longest-palindrome
1371-minimum-remove-to-make-valid-parentheses
1437-minimum-insertion-steps-to-make-a-string-palindrome
1737-maximum-nesting-depth-of-the-parentheses

Greedy

0409-longest-palindrome
0410-split-array-largest-sum
1285-balance-a-binary-search-tree
2148-minimum-number-of-moves-to-seat-everyone

Sliding Window

0003-longest-substring-without-repeating-characters
1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner

Stack

1371-minimum-remove-to-make-valid-parentheses
1737-maximum-nesting-depth-of-the-parentheses

Array

0410-split-array-largest-sum
1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone

Sorting

1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone

Binary Search

0410-split-array-largest-sum
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls

Dynamic Programming

0072-edit-distance
0264-ugly-number-ii
0410-split-array-largest-sum
1437-minimum-insertion-steps-to-make-a-string-palindrome

Prefix Sum

0410-split-array-largest-sum
1037-minimum-number-of-k-consecutive-bit-flips

Math

0264-ugly-number-ii

Heap (Priority Queue)

0264-ugly-number-ii

Bit Manipulation

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

Queue

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

Binary Search Tree

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

Divide and Conquer

1285-balance-a-binary-search-tree

LeetCode Topics

Depth-First Search

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

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2171-second-minimum-time-to-reach-destination

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
2171-second-minimum-time-to-reach-destination
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

Union Find

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

Hash Table

0205-isomorphic-strings
0350-intersection-of-two-arrays-ii
0726-number-of-atoms
1207-delete-nodes-and-return-forest
1741-sort-array-by-increasing-frequency
2306-create-binary-tree-from-descriptions
2502-sort-the-people

String

0058-length-of-last-word
0205-isomorphic-strings
0726-number-of-atoms
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1818-maximum-score-from-removing-substrings
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2502-sort-the-people
3235-minimum-cost-to-convert-string-i

Array

0350-intersection-of-two-arrays-ii
1207-delete-nodes-and-return-forest
1293-three-consecutive-odds
1333-sort-the-jumbled-numbers
1496-lucky-numbers-in-a-matrix
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
2306-create-binary-tree-from-descriptions
2472-build-a-matrix-with-conditions
2502-sort-the-people
2846-robot-collisions
3235-minimum-cost-to-convert-string-i

Two Pointers

0350-intersection-of-two-arrays-ii

Binary Search

0350-intersection-of-two-arrays-ii

Sorting

0350-intersection-of-two-arrays-ii
0726-number-of-atoms
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

1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1818-maximum-score-from-removing-substrings

Linked List

2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros

Simulation

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

Math

1642-water-bottles
1951-find-the-winner-of-the-circular-game
2645-pass-the-pillow

Recursion

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

Queue

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

Stack

0726-number-of-atoms
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1818-maximum-score-from-removing-substrings
2846-robot-collisions

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
2306-create-binary-tree-from-descriptions

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
2306-create-binary-tree-from-descriptions

Matrix

1496-lucky-numbers-in-a-matrix
1711-find-valid-matrix-given-row-and-column-sums
2472-build-a-matrix-with-conditions

Shortest Path

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

Dynamic Programming

1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance