How to validate a string that contains syntax such as "{}(())[[()]]". What is the complexity of your solution? If you had a single server and had to improve the performance of a service, what would you do? Name some design patterns. How does factory work?