My-LeetCode-Solvings

C# Code Challenges Solved on LeetCode


Project maintained by F4NT0 Hosted on GitHub Pages — Theme by mattgraham

678. Valid Parenthesis String

Level: Medium

Language: C#

Topic: String

Unit Tests: 678 - Testing Results


Given a string s containing only three types of characters: (, ) and *, return true if s is valid.

The following rules define a valid string:

Example 1:

Example 2:

Example 3:

Constraints: