Ad
  • Custom User Avatar

    What I wanna know is why I can't unflag the comments even after solving and with mender privileges.

    What I can do is paste them here for everyone else though:

    Hi Hunahpu, sorry about the description. I'll try my best to explain it better. So basicly you'll be given the fruit harvested and also a 2d list of 3 pairs. Your task is to return a list of actions (buy or sell) to trade the fruit harvested back into the fruit harvested. e.g. harvested_fruit = "apple" pairs = [["apple","orange"],["orange","pear"],["apple","pear"]]
    
    1. You start with apple and want to end with apple. (task)
    2. For the first pair apple_orange, as apple is the first fruit in the pair, to convert apple to orange, you need to buy the pair, after this trade, you will end up with orange
    3. For the second pair orange_pear, as orange is the first fruit in the pair, to convert orange to pear, you need to buy the pair, after this trade, you will end up with pear
    4. For the third pair apple_pear, as pear is the second fruit in the pair, to convert pear to apple, you need to sell the pair, after this trade, you will end up with apple
    5. The output therefore should be ["buy","buy","sell"]
    I hope this clears any confusion you might have.
    

    Note: that isn't even what we implemented and it still passed the tests sooooooooo

  • Custom User Avatar

    why on earth would anyone add spoiler flags on an attempt to make the description make any sense

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    In a computer you have bits. They use binary (1 or 0, on or off).
    By combining these, we can begin to go from 1 to much higher numbers.
    it is read right to left as powers of 2.
    example:
    0 0 0 0 0 // is really equal to
    16 8 4 2 1 // this

    So when a bit is "on" or "1", it will count the code below
    EX:
    0 0 1 0 1 //
    16 8 4 2 1

    This turns on 1 and 4 this equals 5.

    1 1 1 1 1
    16 8 4 2 1

    This has 16+8+4+2+1 which equals 31

    0 1 0 0 1 //
    16 8 4 2 1 //

    in this case 8 is on and 1 is on, so 8+1 = 9

    This should be sufficent instruction to help you pass this.
    PS I realize this is old, but others may ask.

  • Custom User Avatar

    its like the compound intrest formula
    you have to iterate problem based on the weight you ger week by week

  • Custom User Avatar

    I too struggled with this until I read the discourse chats. Look for highest 5-digit "string fragment". Think "sliding window" over the string.

  • Custom User Avatar

    if you have 10 numbers as in the given circle 2 is in front of 7

  • Custom User Avatar
  • Custom User Avatar

    Can't you just use kata search page and filter kata of difficulty you feel appropriate for you?

    https://www.codewars.com/kata/latest/my-languages

  • Custom User Avatar

    It's absolutely demotivating when the syhstem tells you that you should be able to do them but you can't and you feel like an idiot, I had to create second account just so I'm not spammed with way too hard katas. I wasted half an hour looking for a way to reset my progress, lower my kyu, ANYTHING to not be stuck just because I accidentaly completed one 6kyu. I logged on this one just to reply, cause I saw email alert.

  • Custom User Avatar

    thats inspirational @rowcased:)

  • Custom User Avatar

    Well, there is an example with 91 and people says they're not consecutive...

  • Custom User Avatar

    I think the description is confusing because in the example he uses; 67890 is highest in 1234567890, numbers are consecutive as in 1,2,3 not just next to each other.

  • Custom User Avatar

    https://lmgtfy.com/?q=convert+to+binary

    ...or just use your calculator (on your computer, or in real)

  • Custom User Avatar

    Oh, but I can. When you click "Kata" on the left side you have filter options and there is "Sort by: Easiest first" or something like this. You can also sort by popularity and it also doesn;t work.

  • Loading more items...