• Custom User Avatar

    I agree, this is a 6 kyu, for C at least.

  • Custom User Avatar

    I'm learing for 10 weeks now and still haven't mastered sorting with lambda

    Perhaps you should review your learning ability first? ;-)

  • Custom User Avatar

    That's not the worst yet :)

  • Custom User Avatar

    Read the instructions, ONLY follow those instructions - Do NOTHING else. Spent a good hour on this one getting compilation errors because I was doing more than it was asking of me.

  • Custom User Avatar

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

  • Custom User Avatar

    In my opinion the easiest approach is to write a somewhat complicated expression out on paper and solve it by hand, keeping track of exactly what you do and why.

    Then just implement exactly what you did in code. You will run into unexpected problems but once you have a reasonable algorithm it shouldnt be hard to spot-fix.

  • Custom User Avatar

    Hi!
    What helped me a lot is a glance at process of building a binary syntax tree, which i read in "You don't know JavaScript" series of books (dont remember which exactly).
    You might also want to solve an easier version of this kata - "Calculator" by obrock, after which solving current one is pretty straightforward.

  • Custom User Avatar

    Introduction to development of compilers.
    Code grammars.

  • Custom User Avatar

    that's because the kata as been put to draft again.

  • Custom User Avatar

    Hey! Short question. I saw you are 2 kyu. Did you get a job with python?

  • Custom User Avatar

    Thanks!

  • Custom User Avatar

    [-1, 10, 2, 0] -> [-1, 0, 2, 10] (middle items of SORTED list)

    Average of 0 and 2 = 1

  • Custom User Avatar

    the estimation of "duplicate" or not for the present kind of kata is pretty user dependent. Most power users will actually considere yours as duplicate because it is pretty close to many other tasks. Just saying. ;)

  • Custom User Avatar

    thing is, in some months you'll realize that yu can do this kind of thing hundreds of times in white level. Then you'll understand why I said this.

    Don't be surprised if some other user raise an issue about duplicates/lack of novelty.

  • Custom User Avatar

    I don't remember a lot of white katas among over 800 I recently solved that would require something like that

    Try searching among yellows, at least one kata asking you to do exactly that is ranked as 5 kyu (or 6 kyu, I'm not really sure).

    the solution would require quite interesting sorting with lambda function

    No, the sorting key would be trivial, altough in this case you wouldn't need to sort anything at all.

  • Loading more items...