Fix Existing Code (Bug Fixing)

Fix Existing Code (Bug Fix)

You are given an existing piece of code and some failing test cases (or hidden tests). The code is intended to implement a specified behavior but contains one or more bu...

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: