Have you heard about "stack"? Try exploring it.
On Fri, Oct 29, 2010 at 1:50 PM, Gourav <[email protected]> wrote:
> Hi All,'
> I was just making some program then i am unable to find following
> Query..
>
>
> Make a program in which Finding the position of opening and closing
> brackets of { }.
> Q..... { () { [ ( ) ] } { ( ) } }
> Then answer should be
> ___________________________________________
> Bracket { openning at 1 and closing at 14
> Bracket ( openning at 2 and closing at 3
> Bracket { openning at 4 and closing at 9
> Bracket [ openning at 5 and closing at 8
> Bracket ( openning at 6 and closing at 7
> and so on
> ___________________________________________