TADM2E 3-6

From Algorithm Wiki
Revision as of 00:04, 22 July 2018 by Justiny (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Modify insert and delete: Pointers to successor and predecessor can be found in O(log n) time upon insertion. Store these in the new Node. predecessor(void * pcNode) and successor(void * pcNode) take O(1). Upon deletion of Node, successor of the predecessor becomes the predecessor of the successor.