Skip to content

himanishprakash/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

Explain each solution in my own language

LeetCode Topics

Hash Table

0001-two-sum
0049-group-anagrams
0146-lru-cache
0217-contains-duplicate
0242-valid-anagram
0347-top-k-frequent-elements
0383-ransom-note
1510-find-lucky-integer-in-an-array
2204-find-subsequence-of-length-k-with-the-largest-sum
3360-minimum-deletions-to-make-string-k-special
3754-maximum-manhattan-distance-after-k-changes

Math

1411-convert-binary-number-in-a-linked-list-to-integer
2202-sum-of-k-mirror-numbers
3600-find-the-k-th-character-in-string-game-i
3754-maximum-manhattan-distance-after-k-changes

String

0014-longest-common-prefix
0049-group-anagrams
0242-valid-anagram
0271-encode-and-decode-strings
0383-ransom-note
2140-longest-subsequence-repeated-k-times
2260-divide-a-string-into-groups-of-size-k
2395-longest-binary-subsequence-less-than-or-equal-to-k
3360-minimum-deletions-to-make-string-k-special
3396-valid-word
3754-maximum-manhattan-distance-after-k-changes

Counting

0347-top-k-frequent-elements
0383-ransom-note
1510-find-lucky-integer-in-an-array
2140-longest-subsequence-repeated-k-times
3360-minimum-deletions-to-make-string-k-special
3754-maximum-manhattan-distance-after-k-changes

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0042-trapping-rain-water
0049-group-anagrams
0064-minimum-path-sum
0134-gas-station
0217-contains-duplicate
0238-product-of-array-except-self
0271-encode-and-decode-strings
0347-top-k-frequent-elements
0883-car-fleet
1343-dice-roll-simulation
1402-count-square-submatrices-with-all-ones
1510-find-lucky-integer-in-an-array
1586-longest-subarray-of-1s-after-deleting-one-element
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1628-count-submatrices-with-all-ones
2144-maximum-difference-between-increasing-elements
2150-kth-smallest-product-of-two-sorted-arrays
2204-find-subsequence-of-length-k-with-the-largest-sum
2320-find-all-k-distant-indices-in-an-array
2497-maximum-matching-of-players-with-trainers
3491-find-the-maximum-length-of-valid-subsequence-ii

Greedy

0134-gas-station
2140-longest-subsequence-repeated-k-times
2395-longest-binary-subsequence-less-than-or-equal-to-k
2497-maximum-matching-of-players-with-trainers
3360-minimum-deletions-to-make-string-k-special

Sorting

0049-group-anagrams
0217-contains-duplicate
0242-valid-anagram
0347-top-k-frequent-elements
0883-car-fleet
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
2204-find-subsequence-of-length-k-with-the-largest-sum
2497-maximum-matching-of-players-with-trainers
3360-minimum-deletions-to-make-string-k-special

Prefix Sum

0238-product-of-array-except-self

Trie

0014-longest-common-prefix

Simulation

2260-divide-a-string-into-groups-of-size-k
3600-find-the-k-th-character-in-string-game-i

Stack

0042-trapping-rain-water
0883-car-fleet
1628-count-submatrices-with-all-ones

Monotonic Stack

0042-trapping-rain-water
0883-car-fleet
1628-count-submatrices-with-all-ones

Dynamic Programming

0042-trapping-rain-water
0064-minimum-path-sum
1343-dice-roll-simulation
1402-count-square-submatrices-with-all-ones
1586-longest-subarray-of-1s-after-deleting-one-element
1628-count-submatrices-with-all-ones
2395-longest-binary-subsequence-less-than-or-equal-to-k
2882-ways-to-express-an-integer-as-sum-of-powers
3491-find-the-maximum-length-of-valid-subsequence-ii

Matrix

0064-minimum-path-sum
1402-count-square-submatrices-with-all-ones
1628-count-submatrices-with-all-ones

Binary Search

0004-median-of-two-sorted-arrays
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
2150-kth-smallest-product-of-two-sorted-arrays

Divide and Conquer

0004-median-of-two-sorted-arrays
0347-top-k-frequent-elements

Two Pointers

0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
2320-find-all-k-distant-indices-in-an-array
2497-maximum-matching-of-players-with-trainers

Enumeration

2140-longest-subsequence-repeated-k-times
2202-sum-of-k-mirror-numbers

Linked List

0019-remove-nth-node-from-end-of-list
0146-lru-cache
0206-reverse-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer

Recursion

0206-reverse-linked-list
3600-find-the-k-th-character-in-string-game-i

Memoization

2395-longest-binary-subsequence-less-than-or-equal-to-k

Backtracking

2140-longest-subsequence-repeated-k-times

Heap (Priority Queue)

0347-top-k-frequent-elements
2204-find-subsequence-of-length-k-with-the-largest-sum

Bit Manipulation

3600-find-the-k-th-character-in-string-game-i

Tree

0230-kth-smallest-element-in-a-bst

Depth-First Search

0230-kth-smallest-element-in-a-bst

Binary Search Tree

0230-kth-smallest-element-in-a-bst

Binary Tree

0230-kth-smallest-element-in-a-bst

Design

0146-lru-cache
0271-encode-and-decode-strings

Doubly-Linked List

0146-lru-cache

Sliding Window

1586-longest-subarray-of-1s-after-deleting-one-element

Bucket Sort

0347-top-k-frequent-elements

Quickselect

0347-top-k-frequent-elements

About

Explain each solution in my own language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published