Veeva Systems Interview Question

Given a string like this "(()())(()", Find the max length of valid string