Ad
  • Custom User Avatar

    At least the footnotes whose number is the square of a prime number.

  • Custom User Avatar

    It really depends on your mathematical background. If you're familiar with sequences and bitwise operations, it's quite trivial. Otherwise, it can take you quite a while.

    Good luck solving it though, I hope you figure it out :)

  • Default User Avatar

    /*
    A new movie has just been released! There are a lot of people at the cinema box office standing in a huge line. Each of them has a single 100, 50 or 25 dollar bill. A movie ticket costs 25 dollars.

    Harry is currently working as a clerk. He wants to sell a ticket to every single person in this line.

    Can Harry sell a ticket to every person and give change if he initially has no money and sells the tickets strictly in the people queue order?

    Return YES, if Harry can sell a ticket to every person and give change with the bills he has at hand at that moment. Otherwise return NO.

    EXAMPLES:
    tickets([25, 25, 50]); // => YES

    tickets([25, 100]); // => NO. Harry will not have enough money to give change to 100 dollars

    tickets([25, 25, 50, 50, 100]); // => NO. Harry will not have the right bills to give 75 dollars of change (you can't make two bills of 25 from one of 50)
    */

  • Custom User Avatar

    Closing.

  • Custom User Avatar

    Your code returned ['NORTH'] but it should've been ['NORTH'; 'NORTH']. What was the input case?

  • Custom User Avatar

    when rounded up to the next dollar, will be cheaper than System A.

  • Default User Avatar

    The description says and each word is important

    no rounding for each ticket
    John wants to know how many times he must go to the cinema
    so that the final result of System B, when rounded up to the next dollar,
    will be cheaper than System A.

  • Custom User Avatar

    I think the answer of the second one is 24 , there is no problem. I just don't understand the third one.
    I think the answer of it is 1, how can it be 2 ? system A : 10 dollars System B: 0 + 10 * 0.95 = 9.5 dollars