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
Web Technologies
37.4K+ articles
Misc
8.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Strings
3.3K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Sorting
1.8K+ articles
Searching
1.7K+ articles
DSA
/
Algorithms
/
Searching
Searching
1.7K+ posts
Recent Articles
Popular Articles
Commonly Asked Data Structure Interview Questions on Searching
Last Updated: 19 May 2025
Searching is a fundamental concept in computer science, involving the process of finding a specific element in a collection of data. Efficient searching techniques are cru...
read more
Searching
DSA
Search in a Matrix or 2D Array
Last Updated: 30 October 2024
Given a matrix mat[n][m] and an element target. return true if the target is present in the matrix, else return false. Examples:Input : mat[][] = { {10, 51, 9}, ...
read more
Searching
Matrix
DSA
Implement Lower Bound
Last Updated: 17 October 2024
Given a sorted array arr[] and a number target, the task is to find the lower bound of the target in this given array. The lower bound of a number is defined as the smalle...
read more
Arrays
Binary Search
Searching
DSA
Implement Upper Bound
Last Updated: 17 October 2024
Given a sorted array arr[] and a number target, the task is to find the upper bound of the target in this given array. The upper bound of a number is defined as the smalle...
read more
Arrays
Binary Search
Searching
DSA
4 Sum - Quadruplet Sum Closest to Target
Last Updated: 15 October 2024
Given an array arr[] of n integers and an integer target, the task is to find a quadruplet in arr[] whose sum is closest to target.Note: There may be multiple quadruplets ...
read more
Arrays
Searching
two-pointer-algorithm
DSA
4 Sum - Find any quadruplet having given sum
Last Updated: 07 October 2024
Given an array arr[] of n integers and an integer target, the task is to find any quadruplet in arr[] such that it's sum is equal to the target. Note: If there are multipl...
read more
Arrays
Searching
two-pointer-algorithm
DSA
Intersection of Two Sorted Arrays with Distinct Elements
Last Updated: 04 October 2024
Given two sorted arraysa[]andb[] with distinct elements of sizenandm respectively, the task is to find intersection (or common elements) of the two arrays. We need to retu...
read more
Arrays
Searching
DSA
union-intersection
Union of Two Sorted Arrays
Last Updated: 04 October 2024
Given two sorted arrays a[] and b[], the task is to to returnunionof both the arrays insorted order. Union of two arrays is an array having alldistinctelements that are pr...
read more
Arrays
Searching
Hash
DSA
union-intersection
2 Sum - Find a pair with given sum
Last Updated: 01 October 2024
Given an array of integers arr[] and an integer target, print a pair of two numbers such that they add up to target. You cannot use the same element twice.Examples:Input: ...
read more
Arrays
Searching
Hash
DSA
Common Elements in Two Sorted Arrays
Last Updated: 17 October 2024
Given two sorted arrays a[] and b[]. The task is to return the common elements of both arrays. If an element appears more than once in both array, we need to pick minimum ...
read more
Arrays
Searching
Merge Sort
array-merge
DSA
union-intersection
Common Elements in Two Arrays
Last Updated: 17 October 2024
Given two arrays, the task is find common elements of the two arrays. The input arrays may contain duplicates and our job is to find all common elements We are allowed to ...
read more
Arrays
Searching
Hash
DSA
union-intersection
Intersection of Two Sorted Arrays
Last Updated: 11 October 2024
Given two sorted arrays a[] and b[], the task is to return intersection. Intersection of two arrays is said to be elements that are common in both arrays. The intersection...
read more
Arrays
Searching
Merge Sort
array-merge
DSA
union-intersection
Intersection of two Arrays
Last Updated: 04 October 2024
Given two arrays a[] and b[], the task is find intersection of the two arrays. Intersectionof two arrays is said to be elements that arecommonin both arrays. The intersect...
read more
Arrays
Searching
Hash
DSA
union-intersection
2 Sum - Pair Sum Closest to Target
Last Updated: 28 December 2024
Given an array arr[] of n integers and an integer target, the task is to find a pair in arr[] such that it’s sum is closest to target.Note:Return the pair in sorted order ...
read more
Arrays
Algorithms
Searching
Sorting
two-pointer-algorithm
DSA
Search in matrix where only individual columns are sorted
Last Updated: 15 April 2025
Given an n * m semi-sorted 2D matrix, mat[][] where each column is individually sorted in ascending order but the rows are not sorted, and a target element x. The task is ...
read more
Binary Search
Divide and Conquer
Searching
Matrix
DSA
1
2
3
4
...
114
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 !