Algorithm: Program to check if braces are balanced or not