Check If Word Is Valid After Insertion
medium
1. You are given a string s determine if it is valid or not. 2. A valid string is a string that can be created by inserting abc at any index any number of times. Example: aabcbc can be created "" -> "abc" -> "aabcbc" while it is impossible to create abccba.
Constraints
1: s consists of letters 'a', 'b', and 'c' only.
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
aabcbc
Sample Output
true
Question Video