Binary Search is a searching algorithm that finds the value in a sorted array in O(logN) time complexity. In my previous post i discuss how to implement binary search using iterative method. In this post i’ll explain how to implement binary search using recursion.
Find Pair of Elements in Array whose Sum is Equal to given number. This is another very tricky/good question generally asked in technical interview. Given array might be sorted or unsorted it depends on the interviewer.
Write a program to count number of words in a string without using any function. This type of question generally asked by the interviewer to check the logic of a candidate.