๐Ÿงฉ

DSA Problem Sheets

Data Structures & Algorithms

๐Ÿ“‹ 70 Problemsโ— Easy 33โ— Medium 32โ— Hard 5
Showing 48 of 70 problems ยท Array
#
Title
Difficulty
1
Determine If an Array Is Already Sorted
Easy
2
Find a Pair That Sums to a Target in a Sorted Array
Easy
3
Find Largest Element in an Array
Easy
4
Find Second Largest Element in an Array
Easy
5
Find the Missing Number in a Sequence
Easy
6
Merge Two Sorted Arrays Into the First Array In Place
Easy
7
Produce the Sorted List of Squared Values
Easy
8
Remove Repeated Values from a Sorted Array
Easy
9
Replace Each Element with the Maximum Element to Its Right
Easy
10
Reverse an Array
Easy
11
Shift All Zeros to the End of the Array
Easy
12
Cyclically Shift an Array by K Steps
Medium
13
Find the Repeated Number in an Array
Medium
14
Find the Triplet Sum Nearest to a Target Value
Medium
15
List Every Unique Quadruplet That Sums to a Target
Medium
16
List Every Unique Triplet That Sums to Zero
Medium
17
Maximum Water Trapped Between Two Vertical Lines
Medium
18
Minimum Rescue Boats Needed Under a Weight Limit
Medium
19
Sort an Array Containing Only 0s, 1s, and 2s
Medium
20
Total Rainwater Trapped Across an Elevation Map
Hard
21
Two Sum
Hard
25
Maximum Sum Subarray of Size K
Medium
26
Longest Run of Consecutive Ones
Easy
27
Longest Run of Ones After K Flips
Medium
28
Count Subarrays With Product Less Than K
Medium
29
Longest Subarray With At Most Two Distinct Values
Medium
30
Smallest Subarray With Sum At Least Target
Medium
32
Maximum of Every Sliding Window of Size K
Hard
33
Cumulative Sum of an Array
Easy
34
Answer a Range Sum Query on an Array
Easy
35
Find the Equilibrium Index of an Array
Easy
36
Longest Subarray With Sum Equal to K
Medium
37
Count Subarrays Summing to K
Medium
38
Product of All Elements Except Self
Medium
39
Largest Sum of Any Contiguous Subarray
Medium
40
Largest Product of Any Contiguous Subarray
Medium
41
Largest Sum Subarray in a Circular Array
Hard
42
Maximum Profit From One Buy and One Sell
Easy
43
Check If an Array Contains Any Duplicate
Easy
44
Length of the Longest Run of Consecutive Numbers
Medium
45
Find the Element Appearing More Than Half the Time
Easy
46
Find All Elements Appearing More Than a Third of the Time
Medium
47
List Every Number That Appears Twice
Medium
48
Sum of Both Diagonals of a Square Matrix
Easy
49
Transpose of a Matrix
Easy
50
Zero Out Rows and Columns Containing a Zero
Medium
51
Traverse a Matrix in Spiral Order
Medium
52
Rotate a Square Matrix 90 Degrees Clockwise
Medium