Glovo Interview Question

Live coding: Valid parentheses. Write an algorithm that given a string containing any combination of various types of parentheses (round, curly, square) determines if the input string is valid.