Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x.
...

Share

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x.
...

Share

Consider an array of distinct numbers sorted in increasing order. The array has been rotated (clockwise) k number of times. Given such an array, find the value of k.
...

Share

We recommend reading following post as a prerequisite of this post.
K’th Smallest/Largest Element in Unsorted Array | Set 1
Given an array and a number k where...

Share

Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. It is given that ll array ...

Share

We recommend reading following posts as a prerequisite of this post.
K’th Smallest/Largest Element in Unsorted Array | Set 1
K’th Smallest/Largest Eleme...

Share

Consider an array of distinct numbers sorted in increasing order. The array has been rotated (clockwise) k number of times. Given such an array, find the value of k.
...

Share

We recommend reading following posts as a prerequisite of this post.
K’th Smallest/Largest Element in Unsorted Array | Set 1
K’th Smallest/Largest Eleme...

Share

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x.
...

Share

Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. It is given that ll array ...

Share