13.4.2. Ch13 Homework#
Implement a function
is_balanced(text)that checks whether parentheses in a string are balanced.Create a queue-based simulation of a customer-service line with at least five customers.
Represent a small company hierarchy as a tree and print it with indentation.
Represent course prerequisites as a graph using a dictionary.
Write a short paragraph comparing BFS and DFS. Include one situation where each would be useful.