Ad
  • Default User Avatar

    Let's make something clear from start. CW is for fun and not for job.

    With that settled, This code is not meant to go in some beauty contest or anything. This is about getting the job done without wasting time on stuff that doesn't matter.

    What you can do in one line, why waste 20 on it.

    it usses various es6 features

    Well ES5 was released in 2009, currently it is 2k17, 8years ago making ES5 basically obselete.

    It doesn't give better time or memory complexity, I just wrote the code to get the job done.

  • Default User Avatar

    Yeah!! I ran into a similar issue of missing a key piece of information and started working things out by hand before I went back re-read the instruction.

  • Default User Avatar

    I would say re-read the instructions, there is a key peice of information you are missing :). In the instructions is read the limits on what m can be; m has to be greater than n

    edit: I added more info because it was in the instructions I decided it wasn't a spoiler.