Ad
  • Default User Avatar

    Thanks a lot, I'm new to Python and don't have quite the logic and syntax in mind yet, so pocket tutorials like this are a big help

  • Default User Avatar

    I have the "5750, 0 -> Expected 4700, got 4699" issue, but the other test work fine.
    Would someone have a clue to share on why or how ?
    Edit : Occurs in Python

  • Default User Avatar

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

  • Default User Avatar

    Rather than checking for None each time you loop, wouldn't it be better to check if lst has a first element in lst[0] and put this value in both l and u on their declaration ?

  • Default User Avatar

    Your program shouldn't break if it receive an invalid (here, null) argument, so you should have some checks for such case before doing anything

  • Default User Avatar

    Well thanks a lot !

    I have a 3 weeks preliminary trial in august, all in C, I won't be allowed to used library, only hand made code, so I'm trying my best to learn the best practice starting now. I went until the linked list and doing a makefile, would you have any other thing to recommand me to learn beforehand ?

    (sorry for any english error, I'm not a native speaker)

  • Default User Avatar

    Hey, I'm a beginner in C, and I'm trying to understand your solution, can you tell me if I'm wrong somewhere ?

    You create an empty char, in which you put digits first char, then digits++ makes it so it's points to digits next char if there's one. It's your loop end condition, c being unable of changing value because digits doesn't have a next value.
    Then ternary condition to store the wanted value in buffer, that I get. It then advance buffer by one.
    The buffer = c part is only usefull in the last turn of the loop, to effectively put the \0 in buffer. For the previous turns of the loop, it puts digits value so 1-9, which then get erased by it's binary value (or \0)

    I have to say (beginner words), it's a great use of ++ after variables and pointers instead of before variables ! It confused me at first, but it's very logical in your code.

  • Default User Avatar

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

  • Default User Avatar

    Very good kata "story", thanks a lot !

  • Default User Avatar

    Is there a reason you didn't initialized ans at -1 directly ?

  • Default User Avatar

    Needs more tests, but a good and simple kata for beginners.

  • Default User Avatar

    I'm coding in Java, where associatives arrays are Hashmap and don't really work like I think they would.
    Currently only 29 people out of 1159 have finished it in Java, this might be linked.
    I don't know if you can change the kyu rating for a specific langage, but difficulty wise for Java, it's probably higher than 7 kyu.

  • Default User Avatar

    There's a typo in the enonce code sample :

    class Person {
    final String name; // team memnber's name

    member > memnber

    (Else the serie is awesome, keep on the good work)

  • Default User Avatar

    This kata was awesome, but maybe a little too easy for 6 kyu, I wonder if it wouldn't be more adequate as a 7 kyu.

  • Default User Avatar

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