Skip to content

harshitseth-1/Leetcode_Solutions-DSA-Folder-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

814 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Leetcode_Solutions-DSA-Folder

My personal collection of LeetCode problem solutions, documented for learning and interview preparation. πŸ’» Data Structures & Algorithms | FAANG Interview Preparation | Optimized Solutions.

LeetCode Solutions πŸ’»

My personal collection of LeetCode problem solutions.

πŸ“Š Progress

  • Total Problems Solved:
  • Easy:
  • Medium:
  • Hard:

Note: Solutions are written in C++ and Java.(Harshit seth)

LeetCode Topics

Tree

0110-balanced-binary-tree
1022-sum-of-root-to-leaf-binary-numbers
1382-balance-a-binary-search-tree

Depth-First Search

0110-balanced-binary-tree
1022-sum-of-root-to-leaf-binary-numbers
1382-balance-a-binary-search-tree

Binary Tree

0110-balanced-binary-tree
1022-sum-of-root-to-leaf-binary-numbers
1382-balance-a-binary-search-tree

Array

0001-two-sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0046-permutations
0066-plus-one
0075-sort-colors
0081-search-in-rotated-sorted-array-ii
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0300-longest-increasing-subsequence
1356-sort-integers-by-the-number-of-1-bits
1536-minimum-swaps-to-arrange-a-binary-grid
1582-special-positions-in-a-binary-matrix
1594-maximum-non-negative-product-in-a-matrix
1727-largest-submatrix-with-rearrangements
1878-get-biggest-three-rhombus-sums-in-a-grid
1886-determine-whether-matrix-can-be-obtained-by-rotation
1980-find-unique-binary-string
3070-count-submatrices-with-top-left-element-and-sum-less-than-k
3212-count-submatrices-with-equal-frequency-of-x-and-y
3296-minimum-number-of-seconds-to-make-mountain-height-zero
3567-minimum-absolute-difference-in-sliding-submatrix
3643-flip-square-submatrix-vertically
3719-longest-balanced-subarray-i
3721-longest-balanced-subarray-ii

Backtracking

0046-permutations
0401-binary-watch
1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1980-find-unique-binary-string

Divide and Conquer

0190-reverse-bits
0761-special-binary-string
1382-balance-a-binary-search-tree
3719-longest-balanced-subarray-i
3721-longest-balanced-subarray-ii

Greedy

1382-balance-a-binary-search-tree
1536-minimum-swaps-to-arrange-a-binary-grid
1689-partitioning-into-minimum-number-of-deci-binary-numbers
1727-largest-submatrix-with-rearrangements
3296-minimum-number-of-seconds-to-make-mountain-height-zero
3600-maximize-spanning-tree-stability-with-upgrades

Binary Search Tree

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0081-search-in-rotated-sorted-array-ii
0167-two-sum-ii-input-array-is-sorted
0278-first-bad-version
0300-longest-increasing-subsequence
0441-arranging-coins
1382-balance-a-binary-search-tree
3296-minimum-number-of-seconds-to-make-mountain-height-zero
3600-maximize-spanning-tree-stability-with-upgrades

Hash Table

0001-two-sum
1461-check-if-a-string-contains-all-binary-codes-of-size-k
1980-find-unique-binary-string
3713-longest-balanced-substring-i
3714-longest-balanced-substring-ii
3719-longest-balanced-subarray-i
3721-longest-balanced-subarray-ii

Segment Tree

1622-fancy-sequence
3719-longest-balanced-subarray-i
3721-longest-balanced-subarray-ii

Prefix Sum

1878-get-biggest-three-rhombus-sums-in-a-grid
3070-count-submatrices-with-top-left-element-and-sum-less-than-k
3129-find-all-possible-stable-binary-arrays-i
3130-find-all-possible-stable-binary-arrays-ii
3212-count-submatrices-with-equal-frequency-of-x-and-y
3714-longest-balanced-substring-ii
3719-longest-balanced-subarray-i
3721-longest-balanced-subarray-ii

String

0005-longest-palindromic-substring
0006-zigzag-conversion
0067-add-binary
0761-special-binary-string
1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one
1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1461-check-if-a-string-contains-all-binary-codes-of-size-k
1545-find-kth-bit-in-nth-binary-string
1689-partitioning-into-minimum-number-of-deci-binary-numbers
1758-minimum-changes-to-make-alternating-binary-string
1784-check-if-binary-string-has-at-most-one-segment-of-ones
1888-minimum-number-of-flips-to-make-the-binary-string-alternating
1980-find-unique-binary-string
3666-minimum-operations-to-equalize-binary-string
3713-longest-balanced-substring-i
3714-longest-balanced-substring-ii

Counting

1356-sort-integers-by-the-number-of-1-bits
3713-longest-balanced-substring-i

Enumeration

3713-longest-balanced-substring-i

Dynamic Programming

0005-longest-palindromic-substring
0070-climbing-stairs
0300-longest-increasing-subsequence
0509-fibonacci-number
0799-champagne-tower
1594-maximum-non-negative-product-in-a-matrix
1888-minimum-number-of-flips-to-make-the-binary-string-alternating
3129-find-all-possible-stable-binary-arrays-i
3130-find-all-possible-stable-binary-arrays-ii

Math

0009-palindrome-number
0066-plus-one
0067-add-binary
0070-climbing-stairs
0189-rotate-array
0231-power-of-two
0441-arranging-coins
0509-fibonacci-number
0762-prime-number-of-set-bits-in-binary-representation
1622-fancy-sequence
1680-concatenation-of-consecutive-binary-numbers
1878-get-biggest-three-rhombus-sums-in-a-grid
3296-minimum-number-of-seconds-to-make-mountain-height-zero
3666-minimum-operations-to-equalize-binary-string

Bit Manipulation

0067-add-binary
0190-reverse-bits
0231-power-of-two
0401-binary-watch
0762-prime-number-of-set-bits-in-binary-representation
0868-binary-gap
1009-complement-of-base-10-integer
1356-sort-integers-by-the-number-of-1-bits
1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one
1461-check-if-a-string-contains-all-binary-codes-of-size-k
1680-concatenation-of-consecutive-binary-numbers

Simulation

0067-add-binary
1404-number-of-steps-to-reduce-a-number-in-binary-representation-to-one
1545-find-kth-bit-in-nth-binary-string
1680-concatenation-of-consecutive-binary-numbers

Two Pointers

0005-longest-palindromic-substring
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0075-sort-colors
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0234-palindrome-linked-list
3643-flip-square-submatrix-vertically

Sorting

0075-sort-colors
0761-special-binary-string
1356-sort-integers-by-the-number-of-1-bits
1727-largest-submatrix-with-rearrangements
1878-get-biggest-three-rhombus-sums-in-a-grid
3567-minimum-absolute-difference-in-sliding-submatrix

Rolling Hash

1461-check-if-a-string-contains-all-binary-codes-of-size-k

Hash Function

1461-check-if-a-string-contains-all-binary-codes-of-size-k

Interactive

0278-first-bad-version

Breadth-First Search

3666-minimum-operations-to-equalize-binary-string

Union-Find

3600-maximize-spanning-tree-stability-with-upgrades
3666-minimum-operations-to-equalize-binary-string

Ordered Set

3666-minimum-operations-to-equalize-binary-string

Matrix

1536-minimum-swaps-to-arrange-a-binary-grid
1582-special-positions-in-a-binary-matrix
1594-maximum-non-negative-product-in-a-matrix
1727-largest-submatrix-with-rearrangements
1878-get-biggest-three-rhombus-sums-in-a-grid
1886-determine-whether-matrix-can-be-obtained-by-rotation
3070-count-submatrices-with-top-left-element-and-sum-less-than-k
3212-count-submatrices-with-equal-frequency-of-x-and-y
3567-minimum-absolute-difference-in-sliding-submatrix
3643-flip-square-submatrix-vertically

Recursion

0021-merge-two-sorted-lists
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0509-fibonacci-number
1545-find-kth-bit-in-nth-binary-string

Sliding Window

1888-minimum-number-of-flips-to-make-the-binary-string-alternating

Graph Theory

3600-maximize-spanning-tree-stability-with-upgrades

Minimum Spanning Tree

3600-maximize-spanning-tree-stability-with-upgrades

Heap (Priority Queue)

1878-get-biggest-three-rhombus-sums-in-a-grid
3296-minimum-number-of-seconds-to-make-mountain-height-zero

Design

1622-fancy-sequence

Memoization

0070-climbing-stairs
0509-fibonacci-number

Linked List

0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0083-remove-duplicates-from-sorted-list
0206-reverse-linked-list
0234-palindrome-linked-list

Stack

0234-palindrome-linked-list

About

My personal collection of LeetCode problem solutions, documented for learning and interview preparation.πŸ’» Data Structures & Algorithms | FAANG Interview Preparation | Optimized Solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors