Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
21.3K+ articles
Misc
8.5K+ articles
Mathematical
7.6K+ articles
Arrays
6.1K+ articles
Competitive Programming
3.1K+ articles
Strings
3.0K+ articles
Searching
1.6K+ articles
Computer Science Fundamentals
1.3K+ articles
Matrix
1.1K+ articles
array-traversal-question
86 posts
Recent Articles
Popular Articles
Chocolate Distribution Problem | Set 2
Last Updated: 14 December 2021
Given an array A[] consisting of N integers, where each value represents the marks of the ith student, the task is to find the minimum number of chocolates required to be ...
read more
Mathematical
DSA
Arrays
Flipkart
interview-preparation
array-traversal-question
Farthest index that can be reached from the Kth index of given array by given operations
Last Updated: 07 December 2022
Given an array arr[] consisting of N integers and three integers X, Y, and K, the task is to find the farthest index that can be reached by the following operations:If arr...
read more
Searching
Sorting
Mathematical
Heap
DSA
Arrays
priority-queue
array-traversal-question
Minimize total time taken by two persons to visit N cities such that none of them meet
Last Updated: 02 February 2022
Given an array arr[] of size N, where arr[i] is the time required to visit ith city, the task is to find the minimum total time required to visit all N cities by two perso...
read more
Searching
Mathematical
Technical Scripter
DSA
Arrays
array-traversal-question
Check if a given array is sorted in Spiral manner or not
Last Updated: 22 April 2021
Given an array arr[] of size N, the task is to check if the array is spirally sorted or not. If found to be true, then print "YES". Otherwise, print "NO".Note: An array is...
read more
Greedy
Pattern Searching
Searching
Mathematical
Computer Science Fundamentals
DSA
Arrays
array-traversal-question
Remove all zero-rows and all zero-columns from a Matrix
Last Updated: 21 December 2022
Given a matrix arr[][] of size N * M, the task is to print the matrix after removing all rows and columns from the matrix which consists of 0s only.Examples:Input: arr[][]...
read more
Misc
Searching
Mathematical
Matrix
DSA
array-rearrange
frequency-counting
array-traversal-question
Check if sum of the given array can be reduced to 0 by reducing array elements by K
Last Updated: 08 April 2021
Given an array arr[] consisting of N integers and an integer K, the task is to check if the sum of the array can be reduced to 0 by subtracting array elements by K any num...
read more
Greedy
Mathematical
DSA
Arrays
array-traversal-question
Maximize sum by traversing diagonally from each cell of a given Matrix
Last Updated: 01 December 2022
Given a 2D square matrix arr[][] of dimensions N x N, the task is to find the maximum path sum by moving diagonally from any cell and each cell must be visited only once i...
read more
Mathematical
Matrix
Technical Scripter
Competitive Programming
DSA
array-traversal-question
Breadth First Traversal ( BFS ) on a 2D array
Last Updated: 31 May 2021
Given a matrix of size M x N consisting of integers, the task is to print the matrix elements using Breadth-First Search traversal.Examples:Input: grid[][] = {{1, 2, 3, 4}...
read more
Graph
Matrix
Technical Scripter
Competitive Programming
Technical Scripter 2020
DSA
BFS
array-traversal-question
Minimize increments required to make count of even and odd array elements equal
Last Updated: 15 September 2022
Given an array arr[] of size N, the task is to find the minimum increments by 1 required to be performed on the array elements such that the count of even and odd integers...
read more
Mathematical
DSA
Arrays
divisibility
array-rearrange
frequency-counting
array-traversal-question
Difference between ceil of array sum divided by K and sum of ceil of array elements divided by K
Last Updated: 17 May 2021
Given an array arr[] and an integer K, the task is to find the absolute difference between the ceil of the total sum of the array divided by K and the sum of the ceil of e...
read more
Mathematical
DSA
Arrays
cpp-math
array-traversal-question
Queries to find index of Kth occurrence of X in diagonal traversal of a Matrix
Last Updated: 16 March 2023
Given a matrix A[][] of size N*M and a 2D array Q[][] consisting of queries of the form {X, K}, the task for each query is to find the position of the Kth occurrence of el...
read more
Hash
Matrix
Competitive Programming
DSA
Arrays
array-traversal-question
Shortest path in a Matrix from top-left to bottom right-corner with neighbors exceeding at most K
Last Updated: 09 September 2023
Given a matrix mat[][] and an integer K, the task is to find the length of the shortest path in a matrix from top-left to bottom right corner such that the difference betw...
read more
Backtracking
Matrix
Binary Search Tree
DSA
Shortest Path
array-traversal-question
Find all indices of Array having value same as average of other elements
Last Updated: 29 March 2022
Given an array arr[] of N integers, the task is to find all indices in the array, such that for each index i the arithmetic mean of all elements except arr[i] is equal to ...
read more
Mathematical
Geeks Premier League
Geeks-Premier-League-2022
DSA
Arrays
array-traversal-question
Check if given Array is Monotonic
Last Updated: 10 April 2023
Given an array arr[] containing N integers, the task is to check whether the array is monotonic or not (monotonic means either the array is in increasing order or in decre...
read more
Greedy
DSA
Arrays
array-traversal-question
Minimize cost to traverse the Arrays with given Array switching cost
Last Updated: 18 May 2022
Given three arrays A[], B[] and C[] of size N each and two integers X and Y, the task is to, find the minimum cost to reach the end of the arrays with the following condit...
read more
Greedy
DSA
Arrays
array-traversal-question
1
2
3
4
5
6
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !