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.7K+ 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
152+ articles
Arrays
274+ posts
Recent Articles
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: 12 September 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
Number of Matches
Last Updated: 06 September 2026
There are n players participating in a knockout tournament. The rating of the i-th player is given by arr[i], where all ratings are distinct.The tournament is conducted in...
read more
DSA
Arrays
Energy After Crossing All Hurdles
Last Updated: 13 September 2026
Given two arrays e[] and h[] of equal size n, representing the energy gained before each hurdle and the height of each hurdle, respectively. Starting with 0 carried energy...
read more
DSA
Arrays
Distribution with i allocated to arr[i]
Last Updated: 05 August 2026
Given an integer array arr[] of n elements, where arr[i] represents the number of goodies currently held by the (i+1)th student. The goodies can be redistributed among the...
read more
DSA
Arrays
C++ Mathematical Programs
DSA
Max Gold Coins from Limited Plates
Last Updated: 07 July 2026
Given n gold boxes, where the i-th box contains a[i] plates and each plate in that box contains b[i] gold coins. A thief can carry at most t plates in total. He may take a...
read more
DSA
Arrays
Greedy Algorithms
Minimum Increments To Make Palindrome
Last Updated: 08 July 2026
Given an array of integers arr[] and an integer k. You may freely shuffle the elements of the array and shuffling is not counted as an operation.Find the minimum of number...
read more
DSA
palindrome
HashSet
Arrays
1
2
3
4
...
19