Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
If the input array is empty, then the proposed solution returns 1, which is inco...

Tomer

Apr 22, 2022

If the input array is empty, then the proposed solution returns 1, which is incorrect.

1

0

Comments
Comments
Shubham Vora
Shubham Voraa year ago

Please, look at the constraints. It clearly says that minimum array length should be 1. `

  • 1 <= nums.length <= 3 * 104

On this page

Problem Statement

Try it yourself