Ad
  • Custom User Avatar

    The fixed tests are only the most basic "happy flow" tests that don't check for error cases such as:

    • / and % with 0 as second argument (division/modulo by 0)
    • non-integer character during integer mode
    • attempt to convert an unmappable number to char code like -1 and 123456
    • = with 0/1 stack items, or : with an empty stack
    • ~ when input is already exhausted (0 is not mappable to a string in languages where strings are 0-terminated).
  • Custom User Avatar

    There are no random tests.

  • Custom User Avatar

    It is not specified what value should be fall back to when reading past all inputs/popping from empty stack. (it's 0)

    It is also not specified how "integer" and "character" are converted between each other. (it's character code)

  • Custom User Avatar

    Ruby should be upgraded to 3.0

  • Custom User Avatar
  • Default User Avatar

    Your input spec is confusing... you say "array of numbers" but examples are all ranges of integers beginning with 1 and climbing in ascending order, so it's a bit confusing what you actually want. It's easy and fast to solve with range inputs by just calculating squares starting at the bottom of the range until you get one that's higher than the top end of the range, but that falls apart if you actually need to test "arrays of numbers" (e.g. [24,18,13,60,5,99])... what are the actual inputs? Arrays of numbers or ranges?