7 kyu

Array of Primes

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • farhanaditya Avatar

    It's not clear from the description whether the start and end of the range are inclusive

  • twypsy Avatar

    "You can assume that parameters numbers will be positive integers and that the start of the range will be less than the end of the range."

    This should be removed from description, as it's not true.

  • Voile Avatar

    You can assume that parameters numbers will be positive integers and that the start of the range will be less than the end of the range.

    Except that random cases have cases where start > end.

  • ignovak Avatar

    You can assume that parameters numbers will be positive integers and that the start of the range will be less than the end of the range.

    Though in random tests section start of the range can be more than the end.

  • ritu_d Avatar

    My code passed the test cases but when I submit, a couple of cases fail. I don't know what cases are failing though. Can I get info about the failing test cases?

  • GiacomoSorbi Avatar

    Kata translated (as usual, two languages and let me know if you find both); I would object on the efficiency of your solution (in private, if you wish) and I must say I am more of Balkoth idea about returning an empty array, but as a mere translator, I kept your choice :)

  • Unnamed Avatar

    Though I can't find one just now, I'd be surprised if this kata is not a duplicate considering how many prime-number-related katas there are.

  • Balkoth Avatar

    It would make a lot more sense to return an empty array instead of null when there are no prime numbers in the range.

  • pwynn Avatar

    1 is not a prime number.