Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.8K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Amazon
1.9K+ articles
Greedy
1.4K+ articles
Sorting
1.1K+ articles
Hash
831+ articles
Hash
153+ articles
Arrays
279+ posts
Recent Articles
Partition Into 4 with Min Sum Diff
Last Updated: 15 October 2026
Given an array arr[], partition it into four non-empty contiguous subarrays P, Q, R, and S. Let the sums of these subarrays be W, X, Y, and Z, respectively. Find the minim...
read more
DSA
Binary Search
prefix-sum
Arrays
Winner in XOR Game of Alternate Moves
Last Updated: 10 October 2026
Given an array arr[] of positive integers, two players take turns removing exactly one element from the array. Before every turn, if the bitwise XOR of all remaining eleme...
read more
DSA
BIT
Arrays
Smallest in Array
Last Updated: 03 October 2026
Given an array of integers arr[]. Find the minimum element.Examples:Input: arr[] = [1, 2, 3, 4]Output: 1Explanation: The smallest element in the array is 1.Input: arr[] = ...
read more
DSA
Arrays
Check Identical Arrays
Last Updated: 26 September 2026
Given a two integer arrays a[] and b[], return true if both the arrays contain the same elements in the same order. Otherwise, return false. Examples:Input: a[] = [1, 2, 3...
read more
DSA
Arrays
Array or List Traversal
Last Updated: 04 October 2026
Given an array arr[] that contains integers. You need to print the elements of the array in a single line with a space between them.Note: Don't add a new line at the end.E...
read more
DSA
Arrays
Elements Less Than K
Last Updated: 21 September 2026
Given an array arr[] and an integer k, return all elements of arr that are less than k. The elements in the returned vector should appear in the same order as in the origi...
read more
DSA
Arrays
Reverse Order of Rows of a Matrix
Last Updated: 19 September 2026
Given a matrix mat[][] of size n × m, reverse the order of its rows in-place. After the operation, the first row should become the last row, the second row should become ...
read more
DSA
Arrays
R-Matrix
Swap All with Next of Next
Last Updated: 19 September 2026
Given an array arr[], swap every ith element of the array with (i+2)th element.Examples:Input: arr[] = [1, 2, 3, 4, 5]Output: [3, 4, 5, 2, 1]Explanation: Swapping 1 and 3,...
read more
DSA
Arrays
Sum of Submatrix Elements
Last Updated: 21 September 2026
Given a matrix arr[][] of size n * m and four integers x1, y1, x2, and y2 representing the top-left and bottom-right corners of a submatrix (using 1-based indexing), find ...
read more
DSA
Arrays
R-Matrix
Count Occurrences of Each Day of Week
Last Updated: 17 September 2026
Given an integer n representing the number of days beginning from 1st date of a month and an integer k representing the starting day of the month, where 1 denotes Monday, ...
read more
DSA
Modular Arithmetic
Arrays
Count n/k Times Occurring
Last Updated: 17 September 2026
Given an array arr[] (may contain duplicates) and a positive integer k, count the number of elements whose occurrence is exactly equal to the size of array arr[] divided b...
read more
DSA
Arrays
Minimum Possible Maximum Value in Array After Subtractions
Last Updated: 16 September 2026
Given an array arr[] of n positive integers, you can perform the following operation any number of times:Choose two indices i and j such that arr[i] = arr[j].Replace arr[i...
read more
DSA
Arrays
number-theory
Swap Adjacent in Array
Last Updated: 18 October 2026
Given an array arr[] of positive integers, swap the ith element with the (i + 2)th element for every valid i, starting from i = 0 and moving from left to right. Return the...
read more
DSA
Arrays
Most Frequent of Two
Last Updated: 10 September 2026
Given an array arr[] and two elements x and y, return the element that occurs more frequently. If both elements have the same frequency, return the smaller one.Examples:In...
read more
DSA
Arrays
Multiply Left and Right Array Sums
Last Updated: 08 September 2026
Given an array of integers arr[], divide it into two subarrays left and right such that left contains the first half of the elements and right contains the remaining eleme...
read more
DSA
Arrays
1
2
3
4
...
19
✕