kodecocodes / swift-algorithm-club

Algorithms and data structures in Swift, with explanations!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Red Black Tree algorithm

fewlinesofcode opened this issue · comments

Brief Intro

Seemingly redundant action in delete(node z: RBNode) method.

More Details

Seems like there is no need in these lines. Also the CRLS implementation doesn't have it if I'm not wrong (lines 444-446)

if nodeY != z {
     z.key = nodeY.key
}