Ad
  • Custom User Avatar

    What the fuck, why????

    EDIT: I missed the comment "// Just for lulz"

  • Custom User Avatar

    Test cases failed for me on the first test case

  • Custom User Avatar

    Wow, this is really clever! For those that don't get it, this is exactly the same as 2**len(list) but is much faster because its doing bitwise operations.

    Basically, 1<<len(list) means you take the bit representing 1: 00000001 and move that one down the byte len(list) bits. so a set with length 5 would push the bit over 5 to be 00100000 == 32 == 2^5.

    Brilliant.

  • Custom User Avatar

    Letting us know that we have to implement the abstract class in the source file would help a little

  • Custom User Avatar

    I agree. I thought the kata was bugged until I came to the discussions. At least add it to the list of cases being tested for...