| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/pythonpeixun/LeetCode-Solutions/master/Python/tag-validator.py | [Back] [Original] |
# Time: O(n)
# Space: O(n)
class Solution(object):
def isValid(self, code):
"""
:type code: str
:rtype: bool
"""
def validText(s, i):
j = i
i = s.find("":
return False, i
return True, k+1
result, i = validTag(code, 0)
return result and i == len(code)
| Web Proxy Viewer | New URL | Original Page |