Basics of Searching Algorithms

Searching Algorithms

Searching algorithms are essential tools in computer science used to locate specific items within a collection of data. These algorithms are designed to efficiently navigate through data structures to find the desired information, making them fundamental in various applications such as databases, web search engines, and more.

Searching Algorithm

Table of Content

  • What is Searching?
  • Searching terminologies
  • Importance of Searching in DSA
  • Applications of Searching
  • Basics of Searching Algorithms
  • Searching Algorithms
  • Comparisons Between Different Searching Algorithms
  • Library Implementations of Searching Algorithms
  • Easy Problems on Searching
  • Medium Problems on Searching
  • Hard Problems on Searching

Similar Reads

What is Searching?

Searching is the fundamental process of locating a specific element or item within a collection of data. This collection of data can take various forms, such as arrays, lists, trees, or other structured representations. The primary objective of searching is to determine whether the desired element exists within the data, and if so, to identify its precise location or retrieve it. It plays an important role in various computational tasks and real-world applications, including information retrieval, data analysis, decision-making processes, and more....

Searching terminologies:

Target Element:...

Importance of Searching in DSA:

Efficiency: Efficient searching algorithms improve program performance. Data Retrieval: Quickly find and retrieve specific data from large datasets. Database Systems: Enables fast querying of databases. Problem Solving: Used in a wide range of problem-solving tasks....

Applications of Searching:

Searching algorithms have numerous applications across various fields. Here are some common applications:...

Basics of Searching Algorithms:

Introduction to Searching – Data Structure and Algorithm Tutorial Importance of searching in Data Structure What is the purpose of the search algorithm?...

Searching Algorithms:

Linear Search Sentinel Linear Search Binary Search Meta Binary Search | One-Sided Binary Search Ternary Search Jump Search Interpolation Search Exponential Search Fibonacci Search The Ubiquitous Binary Search...

Comparisons Between Different Searching Algorithms:

Linear Search vs Binary Search Interpolation search vs Binary search Why is Binary Search preferred over Ternary Search? Is Sentinel Linear Search better than normal Linear Search?...

Library Implementations of Searching Algorithms:

Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound) Arrays.binarySearch() in Java with examples | Set 1 Arrays.binarySearch() in Java with examples | Set 2 (Search in subarray) Collections.binarySearch() in Java with Examples...

Easy Problems on Searching:

Find the largest three elements in an array Find the Missing Number Find the first repeating element in an array of integers Find the missing and repeating number Search, insert and delete in a sorted array Count 1’s in a sorted binary array Two elements whose sum is closest to zero Find a pair with the given difference k largest(or smallest) elements in an array Kth smallest element in a row-wise and column-wise sorted 2D array Find common elements in three sorted arrays Ceiling in a sorted array Floor in a Sorted Array Find the maximum element in an array which is first increasing and then decreasing Given an array of of size n and a number k, find all elements that appear more than n/k times...

Medium Problems on Searching:

Find all triplets with zero sum Find the element before which all the elements are smaller than it, and after which all are greater Find the largest pair sum in an unsorted array K’th Smallest/Largest Element in Unsorted Array Search an element in a sorted and rotated array Find the minimum element in a sorted and rotated array Find a peak element Maximum and minimum of an array using minimum number of comparisons Find a Fixed Point in a given array Find the k most frequent words from a file Find k closest elements to a given value Given a sorted array and a number x, find the pair in array whose sum is closest to x Find the closest pair from two sorted arrays Find three closest elements from given three sorted arrays Binary Search for Rational Numbers without using floating point arithmetic...

Hard Problems on Searching:

Median of two sorted arrays Median of two sorted arrays of different sizes Search in an almost sorted array Find position of an element in a sorted array of infinite numbers Given a sorted and rotated array, find if there is a pair with a given sum K’th Smallest/Largest Element in Unsorted Array | Worst case Linear Time K’th largest element in a stream Best First Search (Informed Search)...

Contact Us