Closed OccupyMars2025 closed 3 months ago
After deleting 61 Inorder traversal of the BST: 1 4 18 51 68 75 76 77 82 92 1,succ:4 4,succ:68 18,succ:51 51,succ:68 68,succ:75 75,succ:76 76,succ:77 77,succ:82 82,succ:92 92,succ:None 1 4 68 75 76 77 82 92 Traceback (most recent call last): File "/home/occupymars2025/Downloads/Introduction-to-Algorithms-4th-Edition/my_implementation/Chapter_12_Binary_Search_Tree/Exercises-12.3/12.3-6-code/bst.py", line 314, in <module> test() File "/home/occupymars2025/Downloads/Introduction-to-Algorithms-4th-Edition/my_implementation/Chapter_12_Binary_Search_Tree/Exercises-12.3/12.3-6-code/bst.py", line 310, in test bst.test_the_structure() File "/home/occupymars2025/Downloads/Introduction-to-Algorithms-4th-Edition/my_implementation/Chapter_12_Binary_Search_Tree/Exercises-12.3/12.3-6-code/bst.py", line 283, in test_the_structure assert len(collected_inorder_list) == len(collected_inorder_list_v2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError make: *** [Makefile:4: python] Error 1 occupymars2025@occupymars2025:~/Downloads/Introduction-to-Algorithms-4th-Edition/my_implementation/Chapter_12_Binary_Search_Tree/Exercises-12.3/12.3-6-code$ (eog:12324): EOG-CRITICAL **: 09:00:20.595: eog_image_get_file: assertion 'EOG_IS_IMAGE (img)' failed (eog:12324): GLib-GIO-CRITICAL **: 09:00:20.595: g_file_equal: assertion 'G_IS_FILE (file1)' failed ^C occupymars2025@occupymars2025:~/Downloads/Introduction-to-Algorithms-4th-Edition/my_implementation/Chapter_12_Binary_Search_Tree/Exercises-12.3/12.3-6-code$
(eog:18668): EOG-CRITICAL **: 10:21:19.276: eog_image_get_file: assertion 'EOG_IS_IMAGE (img)' failed (eog:18668): GLib-GIO-CRITICAL **: 10:21:19.276: g_file_equal: assertion 'G_IS_FILE (file1)' failed
I get the structure of the binary search tree when the bugs occur:
before deleting 61
after deleting 61
compare them