#678

Valid Parenthesis String

medium· Greedyruns: 0

Given a string s containing only three types of characters: '(', ')' and '*', return true if s is valid. Rules: any left parenthesis must have a matching right; any right must have a matching left; left must come before its corresponding right; '*' can be treated as a single right, a single left, or an empty string.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.