Task 2: Valid Brackets (20 pts) • Implete function: bool ValidBrackets(char* str) . str is a string containing only 'C',
Posted: Fri May 20, 2022 5:47 pm
Task 2: Valid Brackets (20 pts) • Implete function: bool ValidBrackets(char* str) . str is a string containing only 'C', '/', '', 'I' and 'l' • Returns True if the input string is valid and False otherwise • In a valid string, • The brackets must match . The brackets must close in the correct order • Sample Input and output Input Output "0" True "0" "O" False True NULL False False Duta Structures and Anths Task 2: Valid Brackets • Hint • You can make use of the Stack ADT . Consider what action you will take when you process the following characters in the string .: : opening brackets .3.1.): closing brackets • Submit the complete code set including • Struct definition • Declaration and implementation for every necessary method • A main function which runs your own test cases