Pergunta de entrevista da empresa USAA

Write a psuedocode program to check if an string of brackets chars is balanced.

Resposta da entrevista

Sigiloso

28 de fev. de 2022

Make a stack, loop through the string and push if open bracket, pop if close bracket and the stack is not already empty, in which the string would be unbalanced. if the loop finishes and the stack is empty, the string is balanced.