After each command, program prints treap
()
| 156 | |
| 157 | |
| 158 | def main() -> None: |
| 159 | """After each command, program prints treap""" |
| 160 | root = None |
| 161 | print( |
| 162 | "enter numbers to create a tree, + value to add value into treap, " |
| 163 | "- value to erase all nodes with value. 'q' to quit. " |
| 164 | ) |
| 165 | |
| 166 | args = input() |
| 167 | while args != "q": |
| 168 | root = interact_treap(root, args) |
| 169 | print(root) |
| 170 | args = input() |
| 171 | |
| 172 | print("good by!") |
| 173 | |
| 174 | |
| 175 | if __name__ == "__main__": |
no test coverage detected