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.


Madan ShekarRank #428 · 5.9K reputationPosted Apr 27, 2019, 11:24 PM EDT
Manoj BhoirRank #599 · 4K reputationPosted Apr 28, 2019, 4:19 AM EDT
2. {
3. {},
4. {},
5. {
6. {}
}
}
}
Veerendra AnnigereRank #927 · 2.2K reputationPosted Apr 30, 2019, 6:34 PM EDT
{{{}}}, score of 1 + 2 + 3 = 6.
Manoj BhoirRank #599 · 4K reputationPosted Apr 27, 2019, 10:09 PM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted Apr 28, 2019, 4:33 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Apr 30, 2019, 7:25 PM EDT
Laxmidhar SahooRank #383 · 6.6K reputationPosted Apr 30, 2019, 8:30 PM EDT