Ad
  • Custom User Avatar

    @wylaris .. Well , That's Okay , Because of

    my_solution(mut lst: Vec<i32>, n_largest_elements: i32) -> i32 , Should Be Updated With the Same Newer Code to match the tests :wink:

    • Thanks for your Time and Efforts Peyton .. Regrads ..
  • Custom User Avatar

    Says published with failed tests but it works every time I run it so idk...

  • Custom User Avatar
  • Custom User Avatar

    Yes, you're right I must have had the two confused when I made this. I just fixed it, thanks for letting us know!

  • Custom User Avatar

    @wylaris..

    • Well , Peyton , Could you please , Check the Issue raised Concertning the Rust Translation , To Fix it ... Regards .. Zizou
  • Custom User Avatar

    Thank you! Good kata! ;)

  • Custom User Avatar

    When two people have the same winning number sort them alphabetically by their firstnames.

    Check that.

  • Custom User Avatar

    JavaScript, all tests passed, except one, where: Expected: 'Willaim', instead got: 'William'

  • Custom User Avatar

    That test is ok, so the problem should be in your code. Check below, mmacak28's post, where I explained it (somehow) without spoiling it too much.
    Chloe is the second but in ascending order.

    Now one can sort the firstnames in decreasing order of the winning numbers. When two people have the same winning number sort them alphabetically by their firstnames.

    Maybe you're sorting the list in the wrong order?

  • Custom User Avatar

    For this test case it is expecting the answer to be Matthew but I'm getting Chloe. What is confusing me about this is Matthew is coming out to be the largest in my code.
    testing("Elijah,Chloe,Elizabeth,Matthew,Natalie,Jayden", vec![1, 3, 5, 5, 3, 6], 2, "Matthew");
    Thank you for your help Chrono79

  • Custom User Avatar

    Could you provide an example? I don't do Rust, but I can check the expected result with other language and tell you if it's a problem with the rust translation or it is a problem with your code.

  • Custom User Avatar

    I don't think the tests in Rust are accurate. I'm fairly certain I have a working solution but I am still failing the tests and the asserts are not making sense.

  • Custom User Avatar

    @wylaris .. Well , Peyton at the random testing Section this Piece Of Code

    for _ in 0..50 { let mut rng = rand::thread_rng(); // Increasing the size of either the number of values in numbers or the range of values // will either result in (sometimes randomly) overloading the main thread and causing a // painic! let numbers: Vec<i32> = (0..10) .map(|_| { rng.gen_range(-10, 10) })

    • Should be Converted (Edited) To Match other Languages Criterias , i mean Vector size range: [3, 202) .,, Element value range: [-100, 100)
    • So , Since Your Translation has been Accepted Then You Have the Right To Access and Change your Own Translation from the Kata's Main Page after Choosing your Rust and Then Convert the Random Section to match the above Criterias , or in other Words Widen the range to generate more numbers Without OverFlow (Mulyiplying/Dividing Number By 0) ,and Increase the List/Vectors size, that's All .. Thanks in advance :relaxed:
  • Custom User Avatar

    I assume you mean for the random testing increasing the integer range? I tried to increase the range but anything larger causes intermittent thread overloading for some odd reason. I'm not quite sure why, I can try to increase the size of the Vec but idk if that'll fix it.

  • Custom User Avatar

    @wylaris

    • Nice Peyton , Hope you've Enjoyed Setting The Random Tests it Will definitely help in Future Kata's translations, and When You make your Own Rust Kata :wink:
    • Thanks for your All Efforts Bro , Revised and Approved
    • ah, By The Way, After Translation Approval, You'll Have the Right (Access) to edit the Kata from its Main Page, So Could you Please, Widen the Range of The Integers, (i.e) from [-1000:1000] for Example, that Will Help as Well
    • Bunch of UpVotes :wink: :+1:
    • Hope you a nice Day, Peyton , all the Best On/ Off CW .. Regards .. Zizou
  • Loading more items...