Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 424 Bytes

File metadata and controls

13 lines (9 loc) · 424 Bytes

Given an array arr[0..n-1] of distinct elements and a range [low, high], find all numbers that are in range, but not in array. The missing elements should be printed in sorted order.

Input: arr[] = {10, 12, 11, 15}, low = 10, hight = 15 Output: 13, 14

Input: arr[] = {1, 14, 11, 51, 15}, low = 50, hight = 55 Output: 50, 52, 53, 54

SPOILER: http://www.geeksforgeeks.org/find-missing-elements-of-a-range/