Courses
Tutorials
Practice
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
DSA
22.5K+ articles
Mathematical
7.8K+ articles
Arrays
6.4K+ articles
C++
4.3K+ articles
Competitive Programming
2.3K+ articles
C Language
2.1K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Sorting
1.8K+ articles
Searching
1.7K+ articles
Arrays
275+ posts
Recent Articles
Popular Articles
Meeting rooms - Find minimum meeting rooms
Last Updated: 26 March 2025
Given two arrays start[] and end[] such that start[i] is the starting time of ith meeting and end[i] is the ending time of ith meeting. Task is to find minimum number of r...
read more
Sorting
Hash
Arrays
Hash
DSA
Interval
Meeting Rooms - Room with Maximum Meetings
Last Updated: 28 April 2025
Given an integernrepresenting the number of rooms numbered from0ton - 1 and a 2D integer arraymeetings[][]wheremeetings[i]=[starti, endi]indicates that a meeting is sch...
read more
Sorting
Heap
Arrays
Greedy Algorithms
min-heap
DSA
Missing ranges of numbers
Last Updated: 02 January 2025
You have an inclusive interval [lower, upper] and a sorted array of unique integers arr[], all of which lie within this interval. A number x is considered missing if x is ...
read more
Arrays
DSA
Find k smallest elements in an array
Last Updated: 21 November 2024
Given an array arr[] and an integer k, the task is to find k smallest elements in the given array. Elements in the output array can be in any order.Examples:Input: arr[] =...
read more
Heap
Arrays
priority-queue
DSA
Delete an Element from the Beginning of an Array
Last Updated: 08 November 2024
Given an array of integers, the task is to delete an element from the beginning of the array.Examples:Input: arr[] = [10, 20, 30, 40]Output: [20, 30, 40]Input: arr[] = [20...
read more
Arrays
Arrays
DSA
Delete an Element from the end of an array
Last Updated: 08 November 2024
Given an array of integers, the task is to delete an element from the end of the array.Examples:Input: arr[] = [10, 20, 30, 40]Output: [10, 20, 30]Input: arr[] = [20]Outpu...
read more
Arrays
Arrays
DSA
Delete an Element from a Given Position in an Array
Last Updated: 08 November 2024
Given an array of integers, the task is to delete an element from a given position in the array.Examples:Input: arr[] = [10, 20, 30, 40], pos = 1Output: [20, 30, 40]Input:...
read more
Arrays
Arrays
DSA
Insert Element at a Given Position in an Array
Last Updated: 07 November 2024
Given an array of integers, the task is to insert an element at a given position in the array.Examples:Input: arr[] = [10, 20, 30, 40], pos = 2, ele = 50Output: [10, 50, 2...
read more
Arrays
Arrays
DSA
Insert Element at the End of an Array
Last Updated: 07 November 2024
Given an array of integers, the task is to insert an element at the end of the array.Examples:Input: arr[] = [10, 20, 30, 40], ele = 50Output: [10, 20, 30, 40, 50]Input: a...
read more
Arrays
Arrays
DSA
Insert Element at the Beginning of an Array
Last Updated: 07 November 2024
Given an array of integers, the task is to insert an element at the beginning of the array. Examples:Input: arr[] = [10, 20, 30, 40], ele = 50Output: [50, 10, 20, 30, 40]I...
read more
Arrays
Arrays
DSA
2 Sum - Find All Pairs With Given Sum
Last Updated: 11 October 2024
Given an arrayarr[]and a target value, the task is to find all possible indices (i, j) of pairs (arr[i], arr[j])whose sum is equal to target and i != j. We can return pair...
read more
Arrays
Hash
Arrays
DSA
Meeting Rooms - Check if a person can attend all meetings
Last Updated: 26 March 2025
Given an array arr[][] such that arr[i][0] is the starting time of ith meeting and arr[i][1] is the ending time of ith meeting, the task is to check if it is possible for ...
read more
Arrays
Sorting
Arrays
DSA
Interval
Find minimum value of arr[j] + abs(j - i) for all indices
Last Updated: 28 May 2024
Given an array arr[] of size N, the task is for each index i (1≤i≤n) find it's minimum value, that can be calculated by the formula (arr[j] + abs(j−i)), for 0=jn and j != ...
read more
Mathematical
Competitive Programming
Arrays
Picked
DSA
Precomputation
Two Way Linear Search Algorithm
Last Updated: 15 May 2024
Two-Way Linear Search Algorithm is based on the principle of Linear Search, but the search is conducted from both ends towards the center of the array. In this article, we...
read more
Algorithms
Searching
Arrays
Algorithms-Searching
DSA
Find Common Elements in Two Arrays in Python
Last Updated: 08 May 2024
Given two arrays arr1[] and arr2[], the task is to find all the common elements among them. Examples:Input: arr1[] = {1, 2, 3, 4, 5}, arr2[] = {3, 4, 5, 6, 7}Output: 3 4 5...
read more
Arrays
Arrays
Python-array
Python-DSA
DSA
1
2
3
4
...
19
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 !