5 kyu

Give The Biggest Prime Factor And The Biggest Divisor Of A Number

202 of 337raulbc777
Description
Loading description...
Fundamentals
Algorithms
Mathematics
  • Please sign in or sign up to leave a comment.
  • depial Avatar

    This comment has been hidden.

  • ejini战神 Avatar
    • The description should give the range of the input (90_000_000) and number of tests.

    • Should be language-agnostic too

    • Optimization and fast algorithms are a key factor to solve this kata should be removed since a lot of non-optimized and memoised solutions can be found submitted successfully ~~

  • ejini战神 Avatar
    • Ruby 3.0 should be enabled

    • Missing end in initial solution setup

    • Undeclared variables should be removed in initial solution setup

    • Unnecessary logs in tests should be removed

  • ejini战神 Avatar
    • Python new test framework should be used

    • Missing : in initial solution setup

    • Undeclared variables should be removed in initial solution setup

    • Unnecessary logs in tests should be removed

  • ejini战神 Avatar
    • JS Node 14. should be enabled

    • Missing end curly bracket in initial solution setup

    • The undeclared variables should be removed and just return [] in initial solution setup

    • In JS the test expects The number has a decimal part. and not The number has a decimal part. No Results as stated in the description.

    • Unnecessary logs in tests should be removed

  • akar-0 Avatar
  • akar-0 Avatar
  • akar-0 Avatar

    D translation. I have not included the input validation part requiring to return a string in case the number is a float with a decimal part. It is something hard to handle in strict typed languages in a non artificial and uselessly complex way, and this is a very trivial task for a 5 kyu kata. Input validations are not appreciated today and this would be probably removed if the kata was published today. I understand the kata is old and when it was published the criterias were different. I hope it's not a problem.

  • Unnamed Avatar

    At least Ruby, probably other languages too: missing edge case tests with powers of pries (like 4 or 9). A few published solution don't handle this case correctly.

  • akar-0 Avatar

    In JS the test expects "The number has a decimal part." and not "The number has a decimal part. No Results" as stated in the description.

  • akar-0 Avatar

    The description should give the range of the input and number of tests.

  • anter69 Avatar
    • Ruby initial solution is in Python format
    • way too easy in Ruby
  • mullaney Avatar

    There is a discrepency between the intructions and the actual tests. Numbers with a decimal part should return "The number has a decimal part. No Results", but instead you test for "The number has a decimal part."

  • Voile Avatar

    Approved

  • JohanWiltink Avatar

    JavaScript local test cases should use AssertSimilar instead of AssertEqual.