Ad
  • Custom User Avatar

    Makes no mention of invalid input in the description.

  • Custom User Avatar

    Sure, something along the lines of this would probably be a lot clearer on the alphabet thing:

    "(...) If our factorials are limited to 0!...9!, the biggest number we can code is 10! - 1.

    So we extend 0!...9! with the 26 letters in the alphabet, making 10! => Z and 35! => A. With these 36 digits we can code up to 36! − 1, or 37199332678990121746799944815083519999999910 (base 10).

    Examples:
    36288000 => A0000000000
    5239813538 => AB29453440100
    "

    The description does not really make the order clear, and the constraints are somewhat confusing. Maybe I'm just tired, but I actually feel like I still don't really understand exactly what the problem was asking for and my solution was wrong.

    The problem says that we are extending from 0!...9! to 0!...35! using the alphabet, but it is not really well explained why we are limited from 0! to 9! to begin with. The constraint is -implied-, but there's no real reason you shouldn't be able to go up to 99! or 1000! or whatever else. The constraints should be more explicit and ask for 0!...n! where n is not 35, as the number of letters in the alphabet is unrelated to how many factorials we choose to allow. It would make more sense to ask for a "Nice" number like 32! and just allow 0-9, A-Z as possible digits.

  • Custom User Avatar

    Description does not clearly explain the requirements, very ambiguously written. Specifically needs more examples and a clarification of the alphabet addendum.

  • Custom User Avatar

    I'm sure this is not how this is meant to be solved, but I'll take it.

  • Custom User Avatar

    Testing description uses '%r' % r, should be '%r' % a.

  • Custom User Avatar

    Good question. Just a lack of familiarity with Javascript. I see also that I left a debugging line in there as well.

    jsperf shows Math.max is considerably faster:
    http://jsperf.com/max-vs-sort-performance

  • Custom User Avatar

    Successful solutions all timeout in Python.

    Edit: Looks fixed now.