Ad
  • Custom User Avatar

    Yes, it is overranked, but it's because it's very old (from 2013). However, it definitely isn't 8kyu. Re-ranking it at this point would be too costly (would require loads of recalculations), so for now... just take the free points and move on :P

  • Default User Avatar
  • Custom User Avatar

    If you're asking this question, you probably have issues with the larger numbers in the submission tests.
    Without seeing your code, it's impossible to know.
    If you're timing out, it's hard to say whether your approach needs a simple tweak or a complete overhaul.

    Quick -- pretend like you're the computer running your algorithm and answer the following:

    What's the next smaller number from 90000001 with the same digits?

    Do you sense that you're doing unncessary work? Is there a simplification you can do?

    If that's no problem,try the same with the following: 912345678?

    If these are hard for you to attempt doing by hand using the algorithm you coded -- you should rethink your algorithm.
    If that's too much you might try a similar experiment in a debugger, stepping line-by-line and noting where your code is spending its time. Is there any unnecessary/pointless work being done?
    If that doesn't help, read the troubleshooting guide available in the codewars docs.

    Good luck! IMO it's the challenge of this exercise that makes it worth figuring out.

  • Custom User Avatar

    I wouldn't use Issuefor a typo, but... fixed. Remember to mention which language you're talking about next time, please.