Pls provide code for the given ques

Given an input of angular bracket sequence, rules to compute marks are:
• <> block has marks 1
•XY has marks X+Y where X and Y are balanced <> blocks
• has marks 3*X where X is a balanced <> block
WAP with appropriate DS and without STL to calculate total marks of given balanced bracket string
e.g = 1 mark
o=11 = 1+1 = 2 marks =<1>= 3 *1 = 3 marks

@raghavvij30 where you read this question

Question not clear (some portion is missing i think)
plz send the link of original question