Skip to content

Collection of LeetCode questions that i have solved

Notifications You must be signed in to change notification settings

devxoshakya/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

Collection of LeetCode questions and their solutions.

LeetCode Topics

Linked List

0021-merge-two-sorted-lists
0061-rotate-list
0083-remove-duplicates-from-sorted-list
0092-reverse-linked-list-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0148-sort-list
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer

Recursion

0021-merge-two-sorted-lists
0143-reorder-list
0206-reverse-linked-list
0234-palindrome-linked-list

Hash Table

0001-two-sum
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0202-happy-number
1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs
1960-check-if-the-sentence-is-pangram

Two Pointers

0061-rotate-list
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0148-sort-list
0160-intersection-of-two-linked-lists
0202-happy-number
0234-palindrome-linked-list
0861-flipping-an-image
0908-middle-of-the-linked-list

Math

0202-happy-number
1031-add-to-array-form-of-integer
1378-cells-with-odd-values-in-a-matrix
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1635-number-of-good-pairs

Divide and Conquer

0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0148-sort-list

Sorting

0148-sort-list
1482-how-many-numbers-are-smaller-than-the-current-number

Merge Sort

0148-sort-list

Stack

0020-valid-parentheses
0084-largest-rectangle-in-histogram
0114-flatten-binary-tree-to-linked-list
0143-reorder-list
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0957-minimum-add-to-make-parentheses-valid
1648-minimum-insertions-to-balance-a-parentheses-string

Design

0232-implement-queue-using-stacks

Queue

0232-implement-queue-using-stacks

Array

0001-two-sum
0084-largest-rectangle-in-histogram
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0861-flipping-an-image
0898-transpose-matrix
1031-add-to-array-form-of-integer
1378-cells-with-odd-values-in-a-matrix
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1482-how-many-numbers-are-smaller-than-the-current-number
1496-lucky-numbers-in-a-matrix
1505-create-target-array-in-the-given-order
1528-kids-with-the-greatest-number-of-candies
1580-shuffle-the-array
1603-running-sum-of-1d-array
1635-number-of-good-pairs
1677-matrix-diagonal-sum
1791-richest-customer-wealth
1899-count-items-matching-a-rule
2048-build-array-from-permutation
2058-concatenation-of-array

Monotonic Stack

0084-largest-rectangle-in-histogram

String

0014-longest-common-prefix
0020-valid-parentheses
0957-minimum-add-to-make-parentheses-valid
1648-minimum-insertions-to-balance-a-parentheses-string
1899-count-items-matching-a-rule
1960-check-if-the-sentence-is-pangram

Greedy

0957-minimum-add-to-make-parentheses-valid
1648-minimum-insertions-to-balance-a-parentheses-string

Tree

0098-validate-binary-search-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0236-lowest-common-ancestor-of-a-binary-tree
0543-diameter-of-binary-tree
0637-average-of-levels-in-binary-tree
1035-cousins-in-binary-tree

Breadth-First Search

0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0107-binary-tree-level-order-traversal-ii
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0637-average-of-levels-in-binary-tree
1035-cousins-in-binary-tree

Binary Tree

0098-validate-binary-search-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0236-lowest-common-ancestor-of-a-binary-tree
0543-diameter-of-binary-tree
0637-average-of-levels-in-binary-tree
1035-cousins-in-binary-tree

Depth-First Search

0098-validate-binary-search-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0236-lowest-common-ancestor-of-a-binary-tree
0543-diameter-of-binary-tree
0637-average-of-levels-in-binary-tree
1035-cousins-in-binary-tree

Binary Search Tree

0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0230-kth-smallest-element-in-a-bst

Simulation

0861-flipping-an-image
0898-transpose-matrix
1378-cells-with-odd-values-in-a-matrix
1505-create-target-array-in-the-given-order
2048-build-array-from-permutation
2058-concatenation-of-array

Prefix Sum

1603-running-sum-of-1d-array

Matrix

0861-flipping-an-image
0898-transpose-matrix
1496-lucky-numbers-in-a-matrix
1677-matrix-diagonal-sum
1791-richest-customer-wealth

Counting

1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs

Bit Manipulation

0861-flipping-an-image

Trie

0014-longest-common-prefix

About

Collection of LeetCode questions that i have solved

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages