Ad
  • Custom User Avatar

    There are no random tests.

  • Custom User Avatar

    If no such word exists, return "No word found".

    For error conditions, returning a magic value that might be a valid return value in non-error conditions is not a good idea.

    Throw an error, or maybe have solver return "" instead ( I haven't solved, and I have not read the description closely to see if "" really makes sense ).

  • Custom User Avatar

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

  • Custom User Avatar

    If we follow the best practice, a function should always return the same type. This will make it easy to translate the problem to languages such as C++ and Java. I would also encourage authors to use type hints in the Solution Setup code.

    from typing import Tuple, List
    
    
    def help_jack(protons: int, neutrons: int) -> Tuple[int, int, List[int], int]:
        # code here
    

    or if we allow the function to return strings too, then:

    from typing import Any
    
    
    def help_jack(protons: int, neutrons: int) -> Any:
        # code here
    
  • Custom User Avatar
    • don't round (see issue below)
    • put a dict of atomic masses in preloaded
    • use all elements
    • use numbers > 9 (most solutions already handle large numbers)
  • Custom User Avatar

    This isn't really true, is it?

    Sort the substrings first by length, then alphabetical order
    
  • Custom User Avatar
    • No Random Tests
    • Kata Concept Lacks Novelty
    • Possible Duplicate