In my IDE, it output "4". And in https://leetcode.com/playground/NKvY3ejf, it also output "4".
I don't understand why i got wrong answer.
@Wonter Please see this and see if it helps: https://leetcode.com/faq/#different-output
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.