Category "binary-search-tree"

Is there a unique Binary Search Tree for given sequence of numbers?

So, this question was asked in my exam: Make a BST for the following sequence of numbers: 45, 32, 90, 34, 68, 72, 15, 24, 30, 66, 11, 50, 10 I created the follo

malloc(): memory corruption (fast)

I just started to learn data structure and getting an error when executing malloc(): memory corruption (fast) what can be the issue and how to resolve it? I h

Get nth largest data value in subtree of BST

I'm looking to return the nth largest data value in the subtree rooted at this node in a BST that can have duplicate values. Right now I have this but it doesn'

Finding the rank of a student GPA in Binary Search Tree

I've read all the posts related to this question, yet I am still having a very hard time understanding how to implement the algorithm. I have a fully written BS

Can we construct a BST from a pre-order traversal simply by inserting the elements in preorder traversal in sequence into an empty tree?

Given a preorder traversal of a BST.I have to construct the BST. Can I construct the BST from the preorder traversal simply by creating a empty BST and then ins