I saw this interesting question. I tried by myself, using lots of loops, hashset...but couldn\'t make it. Please help.
You are given a string S, consisting of N digits, t