We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
i had that same idea but didn't knew about comparator .
in first approach i used String.length()to sort it then i found that i need to compare number too so i got idea to compare number with equal length only as number but then used BigInteger and then got idea to use comparator from your comment and please don't post direct solution .
Big Sorting
You are viewing a single comment's thread. Return to all comments →
i had that same idea but didn't knew about comparator . in first approach i used String.length()to sort it then i found that i need to compare number too so i got idea to compare number with equal length only as number but then used BigInteger and then got idea to use comparator from your comment and please don't post direct solution .