error- source.cpp: In function ‘bool solve(char*, int, int, int, int)’:
source.cpp:33:1: warning: control reaches end of non-void function [-Wreturn-type]
33 | }
| ^
code-- https://ide.codingblocks.com/s/321231
question-- https://hack.codingblocks.com/app/contests/1289/729/problem
Take as input str, a string. The string is a mathematical expression e.g. “[a + {b + (c + d) + e} + f]”. Write a recursive function which tests if the brackets in expression are balanced or not and returns a Boolean value. Print the value returned.
Input Format
Enter the string
Constraints
None
Output Format
Display the boolean result
Sample Input
[a+{b+(c+d)+e}+f]
Sample Output
true