Given integer N, find the smallest larger number that doesn't have the same two digits in consecutive positions.
Example: N = 76.
Answer: 78
. Explanation -> 77
is the smallest larger number after 76
but hence we havedigit 7
in two consecuitive positions, that doesn't satisify our condition.
Note:N=766
-> answer should be 767
, the number digits don't need to be unique, only they have not to be in consecutive positions.