macer_0001
Member level 1
I am using is C++ programming language.
Could you please help me about the program I am working now?
The program is all about checking the string for valid pair or pairs of bracket/s.
{}[]<>()
Then printed "Valid" or "Invalid".
Here are the samples:
Input: Output:
{}dsafsdf Valid
jjhfsajd[] Valid
[sjj<df>] Valid
]sdafasd[ Invalid
(sfd<sf)> Invalid
(dsfsdfsd Invalid
sfsdfsdfsf) Invalid
(){}[]<> Valid
({<[]>}) Valid
Thank you in advance.
Could you please help me about the program I am working now?
The program is all about checking the string for valid pair or pairs of bracket/s.
{}[]<>()
Then printed "Valid" or "Invalid".
Here are the samples:
Input: Output:
{}dsafsdf Valid
jjhfsajd[] Valid
[sjj<df>] Valid
]sdafasd[ Invalid
(sfd<sf)> Invalid
(dsfsdfsd Invalid
sfsdfsdfsf) Invalid
(){}[]<> Valid
({<[]>}) Valid
Thank you in advance.