- Notifications
You must be signed in to change notification settings - Fork2.4k
Open
Description
Bug Report forhttps://neetcode.io/problems/reverse-string
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
class Solution: def reverseString(self, s: List[str]) -> None: """ Do not return anything, modify s in-place instead. """ l, r = 0, len(s) - 1 while l < r: s[l], s[r] = s[r], s[l] l += 1 r -= 1
Input: s=["t", "a", "p", "i", "q"]Your Output: ["q","\"",","," ","\"","t"]Output: ["q","\"",","," ","\"","t"]
Notice one of the values in the output in the array:"\""
Metadata
Metadata
Assignees
Labels
No labels