Hi
i will get one string, in that string i have to count pair of curly braces. bellow is an example of data .
please give me solutions for this .
{}, score of 1.
{{{}}}, score of 1 + 2 + 3 = 6.
{{},{}}, score of 1 + 2 + 2 = 5.
{{{},{},{{}}}}, score of 1 + 2 + 3 + 3 + 3 + 4 = 16.
{{},{},{},{}}, score of 1 + 2 + 2 + 2 + 2 = 9.
{{},{},{},{}}, score of 1 + 2 + 2 + 2 + 2 = 9.

Laxmidhar SahooPosted May 1, 2019, 12:30 AM
Manoj BhoirPosted Apr 30, 2019, 11:25 PM
Veerendra AnnigerePosted Apr 30, 2019, 10:34 PM
{{{}}}, score of 1 + 2 + 3 = 6.
Laxmidhar SahooPosted Apr 28, 2019, 8:33 AM
Manoj BhoirPosted Apr 28, 2019, 8:19 AM
2. {
3. {},
4. {},
5. {
6. {}
}
}
}
Madan ShekarPosted Apr 28, 2019, 3:24 AM
Manoj BhoirPosted Apr 28, 2019, 2:09 AM