You need to sign in or sign up before continuing.×
Ad
  • 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?