由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Potential error in the algorithm RB-INSERT-FIXUP in CLRS (p.316, 3rd ed.)?
相关主题
一个stack怎么sort究竟什么定义了DP
也被A电了一下问个白痴问题,DP到底算不算递归?
Google面试怎么这么难啊,LG很难过,我该怎么劝他呢? (转载)反省了一下面试题目都答对但是还是没offer的原因。。。
问一道google的题Google onsite 5天后被拒了
问一道题(2)linked list排序的算法除了bubble
某银行的笔试题问一道题
问道Google题目Zillow screen 面经,兼打听工资
DP感受 (高手请绕行)CLRS 这本书要看哪几章?
相关话题的讨论汇总
话题: fixup话题: rb话题: insert话题: clrs话题: algorithm
进入JobHunting版参与讨论
1 (共1页)
B*****7
发帖数: 137
1
最近在学CLRS,觉得RB-INSERT-FIXUP有bug。拿出来和大家讨论一下。
The case 1 in the algorithm deals with case that the parent and the uncle of
the newly inserted node are both red nodes. Lines 4-8 repaint the parent
and the uncle into black and the grandparent into red, and then the current
node z moves up to the grandparent as in line 8. However, that shouldn't be
the end of the case. Instead, the routine should recursively call itself, i.
e., there should be statement after line 8 like this:
RB-INSERT-FIXUP(T, z)
Any comments?
1 (共1页)
进入JobHunting版参与讨论
相关主题
CLRS 这本书要看哪几章?问一道题(2)
key 相同的话怎么搞 direct access table 阿?某银行的笔试题
最近连着几个面试都是印度人。问道Google题目
求推荐学习recursive 算法的资料DP感受 (高手请绕行)
一个stack怎么sort究竟什么定义了DP
也被A电了一下问个白痴问题,DP到底算不算递归?
Google面试怎么这么难啊,LG很难过,我该怎么劝他呢? (转载)反省了一下面试题目都答对但是还是没offer的原因。。。
问一道google的题Google onsite 5天后被拒了
相关话题的讨论汇总
话题: fixup话题: rb话题: insert话题: clrs话题: algorithm