为什么我的红黑树搜索功能不起作用?

2024-10-01 07:46:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我必须创建并完成红黑树的函数。搜索功能尤其令人头疼,因为它总是给我这个错误:

  File "C:\Users\YOLO246\Desktop\2211 Assignment 2\Code\rbtree.py", line 135, in insert
    (wasFound, node) = self.search(key)
TypeError: 'NoneType' object is not iterable

有人能帮帮我吗?在

^{pr2}$

Tags: 函数inpy功能错误linecodeusers