|
|
back to boardShow all messages Hide all messagesfor 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 There is a solution O(N) without sorting: check numbers that has length at most 6 digits... |
|
|