Sale
Summer Offer: $190/yr $99/yr
00 : 00 : 00 : 00
Get this deal
Backend Engineering Senior programming

LeetCode #678 - Valid Parenthesis String: Given a string containing just the characters '(', ')', and '*', where '*' can be treated as '(', ')', or an empty string, determine if the string is valid. A string is considered valid if the brackets are closed in the correct order.

Input: str = '(*))'
Output: true
Constraints:
1 <= str.length <= 100
str[i] is '(', ')', or '*'
Suggested Answer

Trusted by 100+ professionals preparing for interviews

Trusted by 100+ professionals 50+ Company Question Banks 5+ Supported Languages

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code runner, and AI-powered walkthroughs.

Get Started Free

More Backend Engineering Interview Prep

LeetCode #295 - Find Median from Data Stream
Backend Engineering · Senior
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Link copied to clipboard