Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about treap

Read more about treap

python (65.2k questions)

javascript (44.3k questions)

reactjs (22.7k questions)

java (20.8k questions)

c# (17.4k questions)

html (16.3k questions)

r (13.7k questions)

android (13k questions)

Questions - treap

Rotation in treap while keeping track of parent nodes

My treap maintains both the heap and BST properties, but the parent nodes of each node in the treap isn't always correct, and I think it's because of how I'm rotating. Here are my rotation functions: ...
test-img

quazi_moto

python

algorithm

tree

avl-tree

treap

Votes: 0

Answers: 1

Latest Answer

Both functions have the same mistake, so I'll focus on left-rotate for now. There are two pointers not being set: new_parent previously had parent as its child, but at the end should have child as it...
test-img

kcsquared

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved