Skip to content

Solutions of some of the best Programs available on LeetCode for Beginners and Intermediate , uploaded on languages namely Python , Java , C++, C .

Notifications You must be signed in to change notification settings

Pritz69/LeetCode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Sorry, we had to truncate this directory to 1,000 files. 8 entries were omitted from the list.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Solutions

Easy Solutions of some of the best programs available on LeetCode for Beginners and Intermediate , uploaded on languages namely Python , Java , C++, C .

Two Pointers

0075-sort-colors
0344-reverse-string
0633-sum-of-square-numbers
0853-most-profit-assigning-work
2572-append-characters-to-string-to-make-subsequence

String

0344-reverse-string
0409-longest-palindrome
0648-replace-words
1044-find-common-characters
2572-append-characters-to-string-to-make-subsequence

Greedy

0330-patching-array
0409-longest-palindrome
0502-ipo
0853-most-profit-assigning-work
0876-hand-of-straights
0982-minimum-increment-to-make-array-unique
1285-balance-a-binary-search-tree
2148-minimum-number-of-moves-to-seat-everyone
2379-maximum-total-importance-of-roads
2572-append-characters-to-string-to-make-subsequence

Database

1245-user-activity-for-the-past-30-days-i
2495-number-of-unique-subjects-taught-by-each-teacher

Hash Table

0409-longest-palindrome
0523-continuous-subarray-sum
0648-replace-words
0876-hand-of-straights
1016-subarray-sums-divisible-by-k
1044-find-common-characters
1217-relative-sort-array
1370-count-number-of-nice-subarrays

Array

0075-sort-colors
0330-patching-array
0502-ipo
0523-continuous-subarray-sum
0648-replace-words
0853-most-profit-assigning-work
0876-hand-of-straights
0982-minimum-increment-to-make-array-unique
1016-subarray-sums-divisible-by-k
1037-minimum-number-of-k-consecutive-bit-flips
1044-find-common-characters
1137-height-checker
1138-grumpy-bookstore-owner
1217-relative-sort-array
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
2148-minimum-number-of-moves-to-seat-everyone

Sorting

0075-sort-colors
0502-ipo
0853-most-profit-assigning-work
0876-hand-of-straights
0982-minimum-increment-to-make-array-unique
1137-height-checker
1217-relative-sort-array
1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone
2379-maximum-total-importance-of-roads

Trie

0648-replace-words

Math

0523-continuous-subarray-sum
0633-sum-of-square-numbers
1370-count-number-of-nice-subarrays

Prefix Sum

0523-continuous-subarray-sum
1016-subarray-sums-divisible-by-k
1037-minimum-number-of-k-consecutive-bit-flips

Counting Sort

0982-minimum-increment-to-make-array-unique
1137-height-checker
1217-relative-sort-array

Heap (Priority Queue)

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

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

Bit Manipulation

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

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

Divide and Conquer

1285-balance-a-binary-search-tree

Graph

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

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

Graph

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
2472-build-a-matrix-with-conditions

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

Array

0033-search-in-rotated-sorted-array
0350-intersection-of-two-arrays-ii
1207-delete-nodes-and-return-forest
1293-three-consecutive-odds
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
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

Hash Table

0350-intersection-of-two-arrays-ii
0726-number-of-atoms
1207-delete-nodes-and-return-forest
2306-create-binary-tree-from-descriptions
2502-sort-the-people

Two Pointers

0350-intersection-of-two-arrays-ii

Binary Search

0033-search-in-rotated-sorted-array
0350-intersection-of-two-arrays-ii

Sorting

0350-intersection-of-two-arrays-ii
0726-number-of-atoms
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
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

Database

0196-delete-duplicate-emails
0610-triangle-judgement
0619-biggest-single-number
0626-exchange-seats
1811-fix-names-in-a-table
1877-find-followers-count
1882-the-number-of-employees-which-report-to-each-employee
1942-primary-department-for-each-employee
2127-employees-whose-manager-left-the-company

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

String

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

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