FusionCharts interview question

Some advanced Coding questions, Overlapping problem, Next greater number with same digits