Ad
  • Default User Avatar

    Okay sounds fair! :) Thanks.

  • Default User Avatar

    @xDJxYummY Worked like a charm! Thank you for the help.

  • Default User Avatar

    My code works for most of the test cases but for some (13) tests cases it fails. And for almost all of them it shows, expected 'Nothing' instead got (some array)

    For start and limit [2177,4357] i get a pair [2295, 2024] as answer.
    For start and limit [70755,82611] i get a pair [75495, 62744] as answer
    For start and limit [543020,553517] i get a pair [544784, 526575] as answer
    For start and limit [202903,212274] i get a pair [206504, 186615] as answer

    and more...
    Can someone help me? What am i doing wrong? Should i post my code?

  • Default User Avatar

    Do people write this type of code in production level software? I mean, maybe its just me, but this type of code is difficult to understand for others (anybody who takes over the project from you, or some new junior). And one can maintain code better only if they understand it.
    Just curios.
    I understand it is a one-liner and it usses various es6 features but still wouldn't traditional for loop be better in this case? Is this sort of code giving better time or memory complexity that i can't understand or is it just the prefernce of the coder?

  • Default User Avatar

    How the fuck do people even come up with such solutions?
    I mean do people write such code in production level code as well?