Computer Science, asked by naveenkolli2105, 1 year ago

Given an array a (may contains duplicates) of size n and q queries. Each query consists of a positive integer k. The task is to find the leftmost index of given number k in the sorted form of input array (1-based indexing).

Answers

Answered by PiyushSinghRajput1
1

Sort an array when two halves are sorted

Given an integer array of which both first half and second half are sorted. Task is to merge two sorted halves of array into single sorted array.

Examples:

Input : A[] = { 2, 3, 8, -1, 7, 10 }

Output : -1, 2, 3, 7, 8, 10

Input : A[] = {-4, 6, 9, -1, 3 }

Output : -4, -1, 3, 6, 9

Answered by Anonymous
2

Answer:

The task is used to fund the each query fir the stored fork of input array having elements nationalists

Similar questions