|All-time Popular Problems|
|Maximum difference between node and its ancestor|
|Delete a node from BST|
|K’th smallest element|
|Detect cycle in a directed graph|
|Element with left side smaller and right side greater|
|Sort The Array|
|Level order traversal Line by Line|
|Add two numbers represented by linked lists|
|Root to leaf path sum|
Given a sorted array A of integers from 0 to 99 (repetition of elements allowed), output all the integer intervals missing from the given list.
First line of input consists of an integer T, denoting the number of test cases. For each test case, enter an integer N, denoting size of the integer array, followed by N space separated integers in sorted order in a new line.
For each test case, there is one line of output denoting the intervals of missing elements, arranged by hyphens and commas. In case of no missing elements i.e. N=100 and 0 to 99 present in the array in sorted order, output a null string/character.
0<=A[i]<=99, i is index of array from 0 to N-1
1 5 67 88
4 55 77 89 91 99
0 3 4 6 80 90 91
For single missing elements, we write them as it is. For consecutive or more differenced integers we use a hyphen in between to denote the interval and separate all the intervals by commas.