Find two elements in an array whose sum is x

Given an array of integers and a number x. check if there exists two elements in the array whose sum = x.

Linear Search – Video

This video discusses the Linear Search algorithm in detail.

Binary Search – Video

This video describes Binary search algorithm.

Binary Search or Half-interval search

Binary search is a Divide & Conquer algorithm used to search for an element in the array. It requires the array to be sorted. If […]

Linear Search in detail

Linear search or Sequential search is a method for finding a particular value in a linear list of values (Array or Linked List). It is done […]

Search in a matrix sorted on rows & columns

Given a matrix whose each row and column is sorted as shown below 10 20 30 40 15 25 35 45 27 29 37 48 […]