1.
Write a program to find all occurrences of a key within a given array using a
sequential search algorithm.
Test Case:
Input:
array = {16, 31, 15, 27, 9, 15, 39, 15, 17, 12}; Key: 15
Output:
Element found at index 2
Element found at index 5
Element found at index 7
2. Given an unsorted array and a number n, find if there exists a pair of elements in
the array whose product is given number n.
Input: arr[] = {5, 20, 3, 2, 50, 80}, n = 150
Output: Pair Found: (3, 50)
3. Given an unsorted array of integers, sort the array into a wave-like array. An array
arr[] is in wave form if arr[0] >= arr[1] <= arr[2] >= arr[3] <= arr[4] >=…
Input: arr[] = {10, 90, 49, 2, 1, 5, 23}
Output: Pair Found: (10, 2, 90, 1, 49, 5, 23)