Well Formed Expression

Revision en1, by rahul_1234, 2017-05-26 23:02:13

You are given a string of ‘n’ characters where n is even. The string only consist of 6 type of characters: (){}[]. The task is to form a well formed expression. A well formed expression consist of proper nesting of braces and their is no priority between the braces like [ > } > ). You can edit any bracket and change it to remaining types for accomplishing the task.

Example 

A. "(){}" is valid 

B. "({[]})” is valid 

C. “((})” is invalid

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rahul_1234 2017-05-26 23:02:13 494 Initial revision (published)