Basic Array 1
Basic Array 1
Basic Questions:
1) Create an Array of size 10 of integers. Take input from the user for these
10 elements and print the entire array after that.
[ Solution: https://www.geeksforgeeks.org/program-find-minimum-maximum-element-array/]
Here, 6 is the size of array and then the elements are input by the user
6) Find the Kth largest and Kth smallest number in an array.
Here n = 3 in the sample input , 11 is size of array and occurrence of 3 is 6 times in the given array
8) Given an array which consists of only 0, 1 and 2. Sort the array without
using any sorting algorithm.
Here, 9 is the size of array input by the user followed by the elements input
9) Find the range of the array. Range means the difference between the
maximum and minimum element in the array.
here , 6 is the size of array followed by the input of elements
10) Move all the negative elements to one side of the array.
NOTE:
You have to write the code for each question
Such that,
First you have to write the code to input the size of array
Second input the elements also by the user
And then perform the mentioned algorithm