|
|
back to boardEasy solution for i = 1.. for j = 0..n-i; atoi() strings str[j...j+i] to num[j] sort(num, num + n - i + 1) find num[j] + 1 < num[j+1] and output num[j]+1 Re: Easy solution There is a solution O(N) without sorting: check numbers that has length at most 6 digits... |
|
|