Question: language c++ how will the solution look like in these two questions 32. Write a program in C++ to find a pair with given sum
32. Write a program in C++ to find a pair with given sum in the array. Expected Output : The given array : 684579 The given sum : 15 Pair of elements can make the given sum by the value of index 0 and 5 33. Write a program in C++to find the majority element of an array. A majority element in an array A[] of size n is an element that appears more than n/2 times (and hence there is at most one such element). Expected Output : The given array is : 48467448 There are no Majority Elements in the given array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
