K-th missing element in an unsorted array. Given an unsorted sequence a[], the task is to find the k-th missing contiguous element in the increasing sequence of the array elements i.E. Consider the array in sorted order and find the kth missing number. If no k-th missing element is there output -1.
Answers
Answered by
0
Answer:
bro I don't know who u r but the is computer science but the question is chemistry
Answered by
0
Answer:first sort the given array than start a loop from the a[0] and compare elemnts if present in array by position. Make count of missing element and print k th missing element.
Best approach use unordered set in c++.
Explanation:
Similar questions
Math,
6 months ago
English,
6 months ago
Hindi,
6 months ago
Business Studies,
1 year ago
Computer Science,
1 year ago