Ad
  • Custom User Avatar

    Better figuring out looking at the examples although I think the description is clear and simple enough to understand as well.

  • Default User Avatar
  • Custom User Avatar

    Almost there. First, you wrote Enhancment in the section title and another paragraph, missing an 'e': "Enhancement". But I would also change every mention of "second" to "other", e.g. here:

    Now there are 2 'Axe of fire', so let’s enhance one of them by destroying the second other one.

    (Because "second" implies ordering, i.e. we destroy the one we found last. That isn't the case though.)

  • Default User Avatar

    Thank you. I agree this kata is more like 4kyu. But since I am new to creating kata, I acted stupidly and was the first to post the Ruby version, and almost everything is easier in Ruby, especially metaprogramming, so those who evaluated it after solving it in Ruby and rated it easier. Well, besides this, new kata are assessed differently than the old ones, so new ones on the same kyu will often be more difficult, I don’t know exactly why this is so.

  • Default User Avatar

    Thanks for the help. Corrected it, is it clearer now? Unfortunately my English is not very good yet

  • Custom User Avatar

    Either I underestimated this kata going in, or this kata was on the more difficult end for 5 kyus. Either way, this was a pretty good kata and I enjoyed the challenge.

  • Default User Avatar

    Thank you! That fixed the problem.

  • Custom User Avatar

    apologies for the late response, but it should be fixed and working properly.

  • Default User Avatar

    Would this be possible for someone with edit permissions to fix this bug?

  • Default User Avatar

    Read several times before understood what was going on. Probably better to emphasize that first the queue is sorted by priorities, then with every "known customer" swapping occurs.

  • Default User Avatar

    The following compile errors were encountered while attempting to pass:

    error[E0308]: mismatched types
      --> src/lib.rs:98:32
       |
    98 |         assert_eq!(get_in_line(&[1,1,3,2,0]), 3);
       |                    ----------- ^^^^^^^^^^^^ expected struct `Vec`, found array `[{integer}; 5]`
       |                    |
       |                    arguments to this function are incorrect
       |
       = note: expected reference `&Vec<i32>`
                  found reference `&[{integer}; 5]`
    

    Could you please fix &[1,1,3,2,0] with &vec![1,1,3,2,0]? Other tests likewise.

    Also the function does not require a mutable reference, probably you want to remove "mut " from calls as well: assert_eq!(get_in_line(&mut vec![1,1,3,2,0]), 3); -> assert_eq!(get_in_line(&vec![1,1,3,2,0]), 3);.

  • Custom User Avatar

    That is true, i hadn't had much experience with Rust when making this problem and i was running into issues just passing in Vec<i32>. Now I've looked back at it and realized it's an easy change.

  • Custom User Avatar
  • Custom User Avatar

    mine better!!!!!!!!!! (thanks to sensei)

  • Custom User Avatar

    Better to read the condition carefully first...

  • Loading more items...