Skip to content

About

My Leetcode Problems in Java

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

452 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA-Problem

My Leetcode Problems in Java

LeetCode Topics

Array

0011-container-with-most-water
0014-longest-common-prefix
0026-remove-duplicates-from-sorted-array
0027-remove-element
0075-sort-colors
0081-search-in-rotated-sorted-array-ii
0088-merge-sorted-array
0108-convert-sorted-array-to-binary-search-tree
0150-evaluate-reverse-polish-notation
0164-maximum-gap
0167-two-sum-ii-input-array-is-sorted
0200-number-of-islands
0219-contains-duplicate-ii
0283-move-zeroes
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0378-kth-smallest-element-in-a-sorted-matrix
0524-longest-word-in-dictionary-through-deleting
0682-baseball-game
0704-binary-search
0724-find-pivot-index
0819-most-common-word
0908-smallest-range-i
0961-n-repeated-element-in-size-2n-array
0989-add-to-array-form-of-integer
1046-last-stone-weight
1295-find-numbers-with-even-number-of-digits
1365-how-many-numbers-are-smaller-than-the-current-number
1413-minimum-value-to-get-positive-step-by-step-sum
1442-count-triplets-that-can-form-two-arrays-of-equal-xor
1470-shuffle-the-array
1480-running-sum-of-1d-array
1512-number-of-good-pairs
1684-count-the-number-of-consistent-strings
1700-number-of-students-unable-to-eat-lunch
1893-check-if-all-the-integers-in-a-range-are-covered
1920-build-array-from-permutation
1984-minimum-difference-between-highest-and-lowest-of-k-scores
1991-find-the-middle-index-in-array
2226-maximum-candies-allocated-to-k-children
2521-distinct-prime-factors-of-product-of-array
2558-take-gifts-from-the-richest-pile
2778-sum-of-squares-of-special-elements
3069-distribute-elements-into-two-arrays-i
3354-make-array-elements-equal-to-zero
3432-count-partitions-with-even-sum-difference
3471-find-the-largest-almost-missing-integer
3483-unique-3-digit-even-numbers
3551-minimum-swaps-to-sort-by-digit-sum

Two Pointers

0011-container-with-most-water
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0075-sort-colors
0088-merge-sorted-array
0141-linked-list-cycle
0142-linked-list-cycle-ii
0167-two-sum-ii-input-array-is-sorted
0283-move-zeroes
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0524-longest-word-in-dictionary-through-deleting
0876-middle-of-the-linked-list
0917-reverse-only-letters
0925-long-pressed-name
2095-delete-the-middle-node-of-a-linked-list
2396-strictly-palindromic-number

Greedy

0011-container-with-most-water
0649-dota2-senate
3723-maximize-sum-of-squares-of-digits

Prefix Sum

0724-find-pivot-index
1413-minimum-value-to-get-positive-step-by-step-sum
1442-count-triplets-that-can-form-two-arrays-of-equal-xor
1480-running-sum-of-1d-array
1893-check-if-all-the-integers-in-a-range-are-covered
1991-find-the-middle-index-in-array
3354-make-array-elements-equal-to-zero
3432-count-partitions-with-even-sum-difference

String

0014-longest-common-prefix
0020-valid-parentheses
0072-edit-distance
0171-excel-sheet-column-number
0257-binary-tree-paths
0383-ransom-note
0389-find-the-difference
0412-fizz-buzz
0524-longest-word-in-dictionary-through-deleting
0649-dota2-senate
0712-minimum-ascii-delete-sum-for-two-strings
0771-jewels-and-stones
0819-most-common-word
0917-reverse-only-letters
0925-long-pressed-name
1021-remove-outermost-parentheses
1545-find-kth-bit-in-nth-binary-string
1614-maximum-nesting-depth-of-the-parentheses
1684-count-the-number-of-consistent-strings
1704-determine-if-string-halves-are-alike
3863-minimum-operations-to-sort-a-string

Hash Table

0141-linked-list-cycle
0142-linked-list-cycle-ii
0219-contains-duplicate-ii
0349-intersection-of-two-arrays
0383-ransom-note
0389-find-the-difference
0771-jewels-and-stones
0819-most-common-word
0961-n-repeated-element-in-size-2n-array
1365-how-many-numbers-are-smaller-than-the-current-number
1442-count-triplets-that-can-form-two-arrays-of-equal-xor
1512-number-of-good-pairs
1684-count-the-number-of-consistent-strings
1893-check-if-all-the-integers-in-a-range-are-covered
2521-distinct-prime-factors-of-product-of-array
3471-find-the-largest-almost-missing-integer
3483-unique-3-digit-even-numbers
3551-minimum-swaps-to-sort-by-digit-sum

Math

0150-evaluate-reverse-polish-notation
0171-excel-sheet-column-number
0412-fizz-buzz
0836-rectangle-overlap
0908-smallest-range-i
0989-add-to-array-form-of-integer
1025-divisor-game
1295-find-numbers-with-even-number-of-digits
1442-count-triplets-that-can-form-two-arrays-of-equal-xor
1512-number-of-good-pairs
1688-count-of-matches-in-tournament
2396-strictly-palindromic-number
2521-distinct-prime-factors-of-product-of-array
3432-count-partitions-with-even-sum-difference
3723-maximize-sum-of-squares-of-digits
3870-count-commas-in-range
3871-count-commas-in-range-ii

Number Theory

2521-distinct-prime-factors-of-product-of-array

Prime Factorization

2521-distinct-prime-factors-of-product-of-array

Euclidean Algorithm

2521-distinct-prime-factors-of-product-of-array

Primality Test

2521-distinct-prime-factors-of-product-of-array

Greatest Common Divisor

2521-distinct-prime-factors-of-product-of-array

Sieve Theory

2521-distinct-prime-factors-of-product-of-array

Prime Number Sieve

2521-distinct-prime-factors-of-product-of-array

Counting

0383-ransom-note
0819-most-common-word
1512-number-of-good-pairs
1684-count-the-number-of-consistent-strings
1704-determine-if-string-halves-are-alike

Binary Search

0081-search-in-rotated-sorted-array-ii
0167-two-sum-ii-input-array-is-sorted
0278-first-bad-version
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0378-kth-smallest-element-in-a-sorted-matrix
0704-binary-search
2226-maximum-candies-allocated-to-k-children

Sorting

0075-sort-colors
0088-merge-sorted-array
0164-maximum-gap
0349-intersection-of-two-arrays
0378-kth-smallest-element-in-a-sorted-matrix
0389-find-the-difference
0524-longest-word-in-dictionary-through-deleting
1365-how-many-numbers-are-smaller-than-the-current-number
1984-minimum-difference-between-highest-and-lowest-of-k-scores
3551-minimum-swaps-to-sort-by-digit-sum

Simulation

0412-fizz-buzz
0682-baseball-game
1545-find-kth-bit-in-nth-binary-string
1688-count-of-matches-in-tournament
1700-number-of-students-unable-to-eat-lunch
1920-build-array-from-permutation
2558-take-gifts-from-the-richest-pile
3069-distribute-elements-into-two-arrays-i
3354-make-array-elements-equal-to-zero

Quicksort

0075-sort-colors

Bubble Sort

0075-sort-colors

Recursion

0021-merge-two-sorted-lists
1545-find-kth-bit-in-nth-binary-string
3483-unique-3-digit-even-numbers

Enumeration

2778-sum-of-squares-of-special-elements
3483-unique-3-digit-even-numbers

Linked List

0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0141-linked-list-cycle
0142-linked-list-cycle-ii
0876-middle-of-the-linked-list
2095-delete-the-middle-node-of-a-linked-list

Trie

0014-longest-common-prefix

Stack

0020-valid-parentheses
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0682-baseball-game
1021-remove-outermost-parentheses
1614-maximum-nesting-depth-of-the-parentheses
1700-number-of-students-unable-to-eat-lunch

Bracket Sequences

0020-valid-parentheses
1021-remove-outermost-parentheses
1614-maximum-nesting-depth-of-the-parentheses

Bit Manipulation

0287-find-the-duplicate-number
0389-find-the-difference
1442-count-triplets-that-can-form-two-arrays-of-equal-xor
1684-count-the-number-of-consistent-strings

Dynamic Programming

0072-edit-distance
0712-minimum-ascii-delete-sum-for-two-strings
1025-divisor-game

Brainteaser

1025-divisor-game
2396-strictly-palindromic-number

Game Theory

1025-divisor-game

Impartial Game

1025-divisor-game

Depth-First Search

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0110-balanced-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0200-number-of-islands
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0841-keys-and-rooms
0938-range-sum-of-bst

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0112-path-sum
0199-binary-tree-right-side-view
0200-number-of-islands
0226-invert-binary-tree
0404-sum-of-left-leaves
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0841-keys-and-rooms

Union-Find

0200-number-of-islands

Matrix

0200-number-of-islands
0378-kth-smallest-element-in-a-sorted-matrix

Longest Common Subsequence

0712-minimum-ascii-delete-sum-for-two-strings

Sliding Window

0219-contains-duplicate-ii
1984-minimum-difference-between-highest-and-lowest-of-k-scores

Geometry

0836-rectangle-overlap

Interactive

0278-first-bad-version

Floyd's Cycle Finding Algorithm

0141-linked-list-cycle
0142-linked-list-cycle-ii
0287-find-the-duplicate-number

Pigeonhole Principle

0164-maximum-gap
0287-find-the-duplicate-number
0961-n-repeated-element-in-size-2n-array

Bucket Sort

0164-maximum-gap

Radix Sort

0164-maximum-gap

Queue

0649-dota2-senate
1700-number-of-students-unable-to-eat-lunch

Heap (Priority Queue)

0378-kth-smallest-element-in-a-sorted-matrix
1046-last-stone-weight
2558-take-gifts-from-the-richest-pile

Tree

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0700-search-in-a-binary-search-tree
0938-range-sum-of-bst

Binary Tree

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0700-search-in-a-binary-search-tree
0938-range-sum-of-bst

Backtracking

0257-binary-tree-paths

Binary Search Tree

0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0700-search-in-a-binary-search-tree
0938-range-sum-of-bst

Divide and Conquer

0108-convert-sorted-array-to-binary-search-tree

Binary Lifting

0235-lowest-common-ancestor-of-a-binary-search-tree

Lowest Common Ancestor

0235-lowest-common-ancestor-of-a-binary-search-tree

Counting Sort

1365-how-many-numbers-are-smaller-than-the-current-number

Graph Theory

0841-keys-and-rooms
1791-find-center-of-star-graph

Database

1068-product-sales-analysis-i
1075-project-employees-i
1084-sales-analysis-iii
1141-user-activity-for-the-past-30-days-i
1148-article-views-i
1179-reformat-department-table
1211-queries-quality-and-percentage
1251-average-selling-price
1280-students-and-examinations
1327-list-the-products-ordered-in-a-period
1378-replace-employee-id-with-the-unique-identifier
1407-top-travellers
1484-group-sold-products-by-the-date
1517-find-users-with-valid-e-mails
1581-customer-who-visited-but-did-not-make-any-transactions
1587-bank-account-summary-ii

About

My Leetcode Problems in Java

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages