Math, asked by NehalandKopal1134, 1 year ago

given an sorted array of size n. find number of elements which are less than or equal to given element.

Answers

Answered by Sangbed
0
Input : arr[] = {1, 2, 4, 5, 8, 10} key = 9 Output : 5 Elements less than or equal to 9 are 1, 2, 4, 5, 8 therefore result will be 5. Input : arr[] = {1, 2, 2, 2, 5, 7, 9} key = 2 Output : 4 Elements less than or equal to 2 are 1, 2, 2, 2 therefore result will
Similar questions