Skip to content

Janani1495/leetcode_practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode_practice

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

LeetCode Topics

Math

0069-sqrtx
0070-climbing-stairs
0089-gray-code
0150-evaluate-reverse-polish-notation
0168-excel-sheet-column-title
0202-happy-number
0263-ugly-number
0326-power-of-three
0342-power-of-four
0405-convert-a-number-to-hexadecimal
0415-add-strings
0441-arranging-coins
0728-self-dividing-numbers
1013-fibonacci-number
1146-greatest-common-divisor-of-strings
1236-n-th-tribonacci-number
1406-subtract-the-product-and-sum-of-digits-of-an-integer
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1630-count-odd-numbers-in-an-interval-range
1635-number-of-good-pairs
2238-a-number-after-a-double-reversal
2288-count-operations-to-obtain-zero
2507-number-of-common-factors
2556-convert-the-temperature
2608-count-the-digits-that-divide-a-number
2748-calculate-delayed-arrival-time
3600-find-the-k-th-character-in-string-game-i
3918-check-divisibility-by-digit-sum-and-product

Binary Search

0004-median-of-two-sorted-arrays
0069-sqrtx
0081-search-in-rotated-sorted-array-ii
0278-first-bad-version
0441-arranging-coins
0745-find-smallest-letter-greater-than-target
1468-check-if-n-and-its-double-exist
1476-count-negative-numbers-in-a-sorted-matrix
2591-frog-jump-ii
2614-maximum-count-of-positive-integer-and-negative-integer

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0049-group-anagrams
0078-subsets
0081-search-in-rotated-sorted-array-ii
0088-merge-sorted-array
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0136-single-number
0150-evaluate-reverse-polish-notation
0164-maximum-gap
0200-number-of-islands
0219-contains-duplicate-ii
0419-battleships-in-a-board
0448-find-all-numbers-disappeared-in-an-array
0485-max-consecutive-ones
0500-keyboard-row
0506-relative-ranks
0518-coin-change-ii
0643-maximum-average-subarray-i
0745-find-smallest-letter-greater-than-target
0748-largest-number-at-least-twice-of-others
0777-toeplitz-matrix
0861-flipping-an-image
0898-transpose-matrix
0940-fruit-into-baskets
1036-rotting-oranges
1039-find-the-town-judge
1112-find-words-that-can-be-formed-by-characters
1127-last-stone-weight
1168-duplicate-zeros
1217-relative-sort-array
1293-three-consecutive-odds
1319-unique-number-of-occurrences
1350-remove-sub-folders-from-the-filesystem
1421-find-numbers-with-even-number-of-digits
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1476-count-negative-numbers-in-a-sorted-matrix
1505-create-target-array-in-the-given-order
1510-find-lucky-integer-in-an-array
1574-maximum-product-of-two-elements-in-an-array
1580-shuffle-the-array
1603-running-sum-of-1d-array
1635-number-of-good-pairs
1677-matrix-diagonal-sum
1786-count-the-number-of-consistent-strings
1791-richest-customer-wealth
1848-sum-of-unique-elements
1899-count-items-matching-a-rule
2058-concatenation-of-array
2190-count-common-words-with-one-occurrence
2219-maximum-number-of-words-found-in-sentences
2320-find-all-k-distant-indices-in-an-array
2442-number-of-arithmetic-triplets
2524-largest-positive-integer-that-exists-with-its-negative
2529-range-product-queries-of-powers
2561-number-of-distinct-averages
2591-frog-jump-ii
2614-maximum-count-of-positive-integer-and-negative-integer
2664-maximize-greatness-of-an-array
2756-buy-two-chocolates
3324-split-the-array
3490-find-the-maximum-length-of-valid-subsequence-i
3843-partition-array-into-two-equal-product-subsets

Two Pointers

0005-longest-palindromic-substring
0088-merge-sorted-array
0125-valid-palindrome
0202-happy-number
0344-reverse-string
0557-reverse-words-in-a-string-iii
0861-flipping-an-image
1168-duplicate-zeros
1468-check-if-n-and-its-double-exist
1894-merge-strings-alternately
2128-reverse-prefix-of-word
2320-find-all-k-distant-indices-in-an-array
2442-number-of-arithmetic-triplets
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
2664-maximize-greatness-of-an-array

String

0005-longest-palindromic-substring
0022-generate-parentheses
0049-group-anagrams
0125-valid-palindrome
0168-excel-sheet-column-title
0205-isomorphic-strings
0290-word-pattern
0297-serialize-and-deserialize-binary-tree
0344-reverse-string
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0405-convert-a-number-to-hexadecimal
0415-add-strings
0434-number-of-segments-in-a-string
0500-keyboard-row
0557-reverse-words-in-a-string-iii
0742-to-lower-case
1112-find-words-that-can-be-formed-by-characters
1146-greatest-common-divisor-of-strings
1350-remove-sub-folders-from-the-filesystem
1764-maximum-repeating-substring
1786-count-the-number-of-consistent-strings
1894-merge-strings-alternately
1899-count-items-matching-a-rule
1915-check-if-one-string-swap-can-make-strings-equal
2076-sum-of-digits-of-string-after-convert
2128-reverse-prefix-of-word
2190-count-common-words-with-one-occurrence
2219-maximum-number-of-words-found-in-sentences
2235-capitalize-the-title
2886-faulty-keyboard
3353-existence-of-a-substring-in-a-string-and-its-reverse
3396-valid-word
3408-count-the-number-of-special-characters-i
3811-reverse-degree-of-a-string

Database

0175-combine-two-tables
0185-department-top-three-salaries
0196-delete-duplicate-emails
0262-trips-and-users
0570-managers-with-at-least-5-direct-reports
0584-find-customer-referee
0585-investments-in-2016
0602-friend-requests-ii-who-has-the-most-friends
0608-tree-node
0626-exchange-seats
0627-swap-salary
1135-customers-who-bought-all-products
1136-actors-and-directors-who-cooperated-at-least-three-times
1153-product-sales-analysis-i
1161-project-employees-i
1174-sales-analysis-iii
1182-game-play-analysis-iv
1245-user-activity-for-the-past-30-days-i
1258-article-views-i
1268-market-analysis-i
1317-monthly-transactions-i
1327-last-person-to-fit-in-the-bus
1338-queries-quality-and-percentage
1390-average-selling-price
1415-students-and-examinations
1462-list-the-products-ordered-in-a-period
1509-replace-employee-id-with-the-unique-identifier
1523-capital-gainloss
1541-top-travellers
1625-group-sold-products-by-the-date
1670-patients-with-a-condition
1724-customer-who-visited-but-did-not-make-any-transactions
1734-bank-account-summary-ii
1773-percentage-of-users-attended-a-contest
1801-average-time-of-process-per-machine
1811-fix-names-in-a-table
1827-invalid-tweets
1837-daily-leads-and-partners
1877-find-followers-count
1882-the-number-of-employees-which-report-to-each-employee
1892-find-total-time-spent-by-each-employee
1908-recyclable-and-low-fat-products
1942-primary-department-for-each-employee
1948-rearrange-products-table
2024-calculate-special-bonus
2041-the-latest-login-in-2020
2057-count-salary-categories
2110-employees-with-missing-information
2127-employees-whose-manager-left-the-company
2495-number-of-unique-subjects-taught-by-each-teacher
3782-find-valid-emails
3803-find-products-with-valid-serial-numbers

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0070-climbing-stairs
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0338-counting-bits
0518-coin-change-ii
1013-fibonacci-number
1236-n-th-tribonacci-number
1764-maximum-repeating-substring
3490-find-the-maximum-length-of-valid-subsequence-i

Bit Manipulation

0078-subsets
0089-gray-code
0136-single-number
0191-number-of-1-bits
0338-counting-bits
0342-power-of-four
0389-find-the-difference
0405-convert-a-number-to-hexadecimal
0461-hamming-distance
0476-number-complement
0861-flipping-an-image
1435-xor-queries-of-a-subarray
1786-count-the-number-of-consistent-strings
2529-range-product-queries-of-powers
3600-find-the-k-th-character-in-string-game-i
3843-partition-array-into-two-equal-product-subsets

Divide and Conquer

0004-median-of-two-sorted-arrays
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0109-convert-sorted-list-to-binary-search-tree
0191-number-of-1-bits

Hash Table

0001-two-sum
0049-group-anagrams
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0202-happy-number
0205-isomorphic-strings
0219-contains-duplicate-ii
0290-word-pattern
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0448-find-all-numbers-disappeared-in-an-array
0500-keyboard-row
0940-fruit-into-baskets
1039-find-the-town-judge
1112-find-words-that-can-be-formed-by-characters
1217-relative-sort-array
1319-unique-number-of-occurrences
1468-check-if-n-and-its-double-exist
1510-find-lucky-integer-in-an-array
1635-number-of-good-pairs
1786-count-the-number-of-consistent-strings
1848-sum-of-unique-elements
1915-check-if-one-string-swap-can-make-strings-equal
2190-count-common-words-with-one-occurrence
2442-number-of-arithmetic-triplets
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
3324-split-the-array
3353-existence-of-a-substring-in-a-string-and-its-reverse
3408-count-the-number-of-special-characters-i

Sliding Window

0219-contains-duplicate-ii
0643-maximum-average-subarray-i
0940-fruit-into-baskets

Recursion

0326-power-of-three
0342-power-of-four
1013-fibonacci-number
3600-find-the-k-th-character-in-string-game-i
3843-partition-array-into-two-equal-product-subsets

Stack

0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0775-n-ary-tree-preorder-traversal
2128-reverse-prefix-of-word

Queue

0387-first-unique-character-in-a-string

Counting

0383-ransom-note
0387-first-unique-character-in-a-string
1112-find-words-that-can-be-formed-by-characters
1510-find-lucky-integer-in-an-array
1635-number-of-good-pairs
1786-count-the-number-of-consistent-strings
1848-sum-of-unique-elements
1915-check-if-one-string-swap-can-make-strings-equal
2190-count-common-words-with-one-occurrence
2614-maximum-count-of-positive-integer-and-negative-integer
3324-split-the-array

Sorting

0049-group-anagrams
0088-merge-sorted-array
0164-maximum-gap
0389-find-the-difference
0506-relative-ranks
0748-largest-number-at-least-twice-of-others
1217-relative-sort-array
1468-check-if-n-and-its-double-exist
1574-maximum-product-of-two-elements-in-an-array
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
2664-maximize-greatness-of-an-array
2756-buy-two-chocolates

Memoization

0070-climbing-stairs
1013-fibonacci-number
1236-n-th-tribonacci-number

Simulation

0415-add-strings
0861-flipping-an-image
0898-transpose-matrix
1505-create-target-array-in-the-given-order
2058-concatenation-of-array
2076-sum-of-digits-of-string-after-convert
2288-count-operations-to-obtain-zero
2886-faulty-keyboard
3600-find-the-k-th-character-in-string-game-i
3811-reverse-degree-of-a-string

Greedy

2591-frog-jump-ii
2664-maximize-greatness-of-an-array
2756-buy-two-chocolates

Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0109-convert-sorted-list-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0775-n-ary-tree-preorder-traversal
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees

Depth-First Search

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0200-number-of-islands
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0419-battleships-in-a-board
0547-number-of-provinces
0775-n-ary-tree-preorder-traversal
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1350-remove-sub-folders-from-the-filesystem

Binary Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0109-convert-sorted-list-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0200-number-of-islands
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0547-number-of-provinces
1036-rotting-oranges

Binary Search Tree

0109-convert-sorted-list-to-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0975-range-sum-of-bst

Linked List

0092-reverse-linked-list-ii
0109-convert-sorted-list-to-binary-search-tree
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
1411-convert-binary-number-in-a-linked-list-to-integer

Bucket Sort

0164-maximum-gap

Radix Sort

0164-maximum-gap

Trie

1350-remove-sub-folders-from-the-filesystem

Heap (Priority Queue)

0506-relative-ranks
1127-last-stone-weight
1574-maximum-product-of-two-elements-in-an-array

Matrix

0200-number-of-islands
0419-battleships-in-a-board
0777-toeplitz-matrix
0861-flipping-an-image
0898-transpose-matrix
1036-rotting-oranges
1476-count-negative-numbers-in-a-sorted-matrix
1677-matrix-diagonal-sum
1791-richest-customer-wealth

Interactive

0278-first-bad-version

Backtracking

0022-generate-parentheses
0078-subsets
0089-gray-code

String Matching

1764-maximum-repeating-substring

Graph

0547-number-of-provinces
1039-find-the-town-judge

Counting Sort

1217-relative-sort-array

Union Find

0200-number-of-islands
0547-number-of-provinces

Prefix Sum

1435-xor-queries-of-a-subarray
1603-running-sum-of-1d-array
2529-range-product-queries-of-powers

Enumeration

2442-number-of-arithmetic-triplets
2507-number-of-common-factors
3843-partition-array-into-two-equal-product-subsets

Number Theory

2507-number-of-common-factors

Design

0297-serialize-and-deserialize-binary-tree

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages