dsa vault

1.
Find Duplicate Number
arrays
medium
solution:
2.
Sort Colors
arrays
medium
solution:
3.
Remove Duplicates from Sorted Array
arrays
easy
solution:
4.
Move Zeroes
arrays
easy
solution:
5.
Best Time to Buy and Sell Stock
arrays
easy
solution:
6.
Chocolate Distribution Problem
arrays
easy
solution:
7.
Two Sum
arrays
easy
solution:
8.
Majority Element
arrays
easy
solution:
9.
Merge Sorted Array
arrays
easy
solution:
10.
Maximum Product Subarray
arrays
medium
solution:
11.
Best Time to Buy and Sell Stock II
arrays
medium
solution:
12.
Product of Array Except Self
arrays
medium
solution:
13.
3 Sum
arrays
medium
solution:
14.
3 Sum Closest
arrays
medium
solution:
15.
Valid Triangle Number
arrays
medium
solution:
16.
4 Sum
arrays
medium
solution:
17.
Maximum Subarray
arrays
medium
solution:
18.
Subarray Sums Divisible by K
arrays
medium
solution:
19.
Find All Duplicates in an Array
arrays
medium
solution:
20.
Container With Most Water
arrays
medium
solution:
21.
Minimum Size Subarray Sum
arrays
medium
solution:
22.
Majority Element II
arrays
medium
solution:
23.
Merge Intervals
arrays
medium
solution:
24.
Insert Interval
arrays
medium
solution:
25.
Non-overlapping Intervals
arrays
medium
solution:
26.
Longest Consecutive Sequence
arrays
medium
solution:
27.
Next Permutation
arrays
medium
solution:
28.
Sort an Array
arrays
medium
solution:
29.
Trapping Rain Water
arrays
hard
solution:
30.
Count Inversions
arrays
hard
solution:
31.
Reverse Pairs
arrays
hard
solution:
32.
First Missing Positive
arrays
hard
solution:
33.
Group Anagrams
hashing
medium
solution:
34.
Word Subsets
hashing
medium
solution:
35.
Partition Labels
hashing
medium
solution:
36.
Longest Repeating Character Replacement
hashing
medium
solution:
37.
Split Array into Consecutive Subsequences
hashing
medium
solution:
38.
Valid Sudoku
hashing
medium
solution:
39.
Substring with Concatenation of All Words
hashing
hard
solution:
40.
Search an Array In An Infinite Sorted Array
binary search
medium
solution:
41.
Search in Rotated Sorted Array
binary search
medium
solution:
42.
Search in Rotated Sorted Array II
binary search
medium
solution:
43.
Find Minimum in Rotated Sorted Array
binary search
medium
solution:
44.
Find First and Last Position of Element in Sorted Array
binary search
medium
solution:
45.
Find K Closest Elements
binary search
medium
solution:
46.
Peak Index in a Mountain Array
binary search
medium
solution:
47.
Find Peak Element
binary search
medium
solution:
48.
Capacity To Ship Packages Within D Days
binary search
medium
solution:
49.
Aggressive Cows
binary search
medium
solution:
50.
Magnetic Force Between Two Balls
binary search
medium
solution:
51.
Minimum Limit of Balls in a Bag
binary search
medium
solution:
52.
Search a 2D Matrix
binary search
medium
solution:
53.
Search a 2D Matrix II
binary search
medium
solution:
54.
Find Minimum in Rotated Sorted Array II
binary search
hard
solution:
55.
Allocate minimum number of pages
binary search
hard
solution:
56.
Split Array Largest Sum
binary search
hard
solution:
57.
Median of Two Sorted Arrays
binary search
hard
solution:
58.
Set Matrix Zeroes
matrix
medium
solution:
59.
Spiral Matrix
matrix
medium
solution:
60.
Game of Life
matrix
medium
solution:
61.
Valid Parentheses
stack
easy
solution:
62.
Smallest number on left
stack
medium
solution:
63.
Previous greater element
stack
medium
solution:
64.
Next Smaller Element
stack
medium
solution:
65.
Next Greater Element
stack
medium
solution:
66.
Next Greater Element II
stack
medium
solution:
67.
Largest Rectangle in Histogram
stack
hard
solution:
68.
Maximal Rectangle
stack
hard
solution:
69.
Sliding Window Maximum
hard
solution:
70.
Kth Largest Element in an Array
priority queue
medium
solution:
71.
Top K Frequent Elements
priority queue
medium
solution:
72.
Merge k Sorted Arrays
priority queue
medium
solution:
73.
Task Scheduler
priority queue
medium
solution:
74.
Hand of Straights
priority queue
medium
solution:
75.
Merge k Sorted Lists
priority queue
hard
solution:
76.
Find Median from Data Stream
priority queue
hard
solution:
77.
Remove Duplicates from Sorted List
linked lists
easy
solution:
78.
Linked List Cycle
linked lists
easy
solution:
79.
Linked List Cycle II
linked lists
easy
solution:
Copyright © 2023 KIZLE. - All Rights Reserved.
Website by Kounik Maitra