Question
1.a C++ program to find the largest element of a given array of integers. 2.a C++ program to find the largest three elements in an
1.a C++ program to find the largest element of a given array of integers.
2.a C++ program to find the largest three elements in an array.
3.a C++ program to find second largest element in an given array of integers.
4.a C++ program to find k largest elements in a given array of integers.
5.a C++ program to find the smallest and second smallest elements in a given array of integers.
6.a C++ program to find all elements in array of integers which have at-least two greater elements.
7.a C++ program to find the most occurring element in an array of integers.
8.a C++ program to find the next greater element of every element of a given array of integers. Ignore those elements which have no greater element.
9.a C++ program to sort a given unsorted array of integers, in wave form.
Note: An array is in wave form when array[0] >= array[1] <= array[2] >= array[3] <= array[4] >= . . . .
10.a C++ program to find the smallest element missing in a sorted array.
11.a C++ program to update every array element by multiplication of next and previous values of a given array of integers.
12.a C++ program to rearrange the elements of a given array of integers in zig-zag fashion way.
Note: The format zig-zag array in form a < b > c < d > e < f.
13.a C++ program to separate even and odd numbers of an array of integers. Put all even numbers first, and then odd numbers.
14.a C++ program to separate 0s and 1s from a given array of values 0 and 1.
15.a C++ program to rearrange a given sorted array of positive integers .
Note: In final array, first element should be maximum value, second minimum value, third second maximum value , fourth second minimum value, fifth third maximum and so on.
16.a C++ program to sort a given array of 0s, 1s and 2s. In the final array put all 0s first, then all 1s and all 2s in last.
17.a C++ program to sort (in descending order) an array of distinct elements according to absolute difference of array elements and with a given value.
18.a C++ program to move all negative elements of an array of integers to the end of the array without changing the order of positive element and negative element.
19.a C++ program to find a number which occurs odd number of times of a given array of positive integers. In the said array all numbers occur even number of times.
20.a C++ program to count the number of occurrences of given number in a sorted array of integers.
21.a C++ program to find the two repeating elements in a given array of integers.
22.a C++ program to find the missing element from two given arrays of integers except one element.
23.a C++ program to find the element that appears once in an array of integers and every other element appears twice.
24.a C++ program to find the first repeating element in an array of integers.
25.a C++ program to find and print all common elements in three sorted arrays of integers.
26.a C++ program to find and print all unique elements of a given array of integers.
27.a C++ program to find the number of pairs of integers in a given array of integers whose sum is equal to a specified number.
28.a C++ program to arrange the numbers of a given array in a way that the sum of some numbers equal the largest number in the array.
29.a C++ program to find the second lowest and highest numbers in a given array.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started