Mark As Completed Discussion

The attached code is what the entire method would look like all together.

The time complexity would be O(n) or linear time.

JAVASCRIPT
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment