Program to make pair of elements alternatively
Description This program will explain how to make pair of elements from taking elements from mid with elements from start alternatively. Example 1 : arr[] = {2,7,6,3,5,9} After making pair…
All Program Related To Data Structure
Description This program will explain how to make pair of elements from taking elements from mid with elements from start alternatively. Example 1 : arr[] = {2,7,6,3,5,9} After making pair…
Description In this program the array elements will be space separated like string. The program will take elements from string rejecting spaces, then it will find maximum and second maximum.…
Description To find two elements from an array, whose sum is equal to given value, use two loops, first loop start from index 0 and second loop start next to…
Description An array is called perfect if reverse of array matches with original array. For checking perfect, reverse the array and compare with original array, if it matches then it…
Description Given an array of n positive integers, to find the elements whose value is equal to that of its index value follow below program. C/C++ /* C program to…
Description To find K largest elements from array, sort the array in ascending order and print the elements from end. C/C++ /* C program to Find K largest elements from…
Description This program is for finding missing odd number in first n odd number. The (n-1) odd number will be any random odd number in the range of first n…
Description This program is for finding smallest number that is missing from the array. Given a sorted array of n distinct integers where each integer is in the range from…
Description Mode is a value which occur most frequently in a array. Ex: arr[] = {3,6,2,3,7} Mode will be 3 as it's frequency is 2 which is greatest in this…
Description For calculation of median, the array must be sorted. 1) If number of elements of array even then median will be average of middle two elements. ex : arr[]…