On Thursday, August 31, 2023 at 4:37:08 PM UTC-7, Greg Westin wrote:
stuct node {
int val;
node* left;
node* right;
};
node* createNewNode(int y)
{
node* nn = new node;
val = y;
left = nullptr;
right = nullptr;
return nn;
}
void bstInsert(node* &root, int y)
{
if(root == nullptr) {
root = createNewNode(y);
return;
}
if(y < root->val)
{
if(root->left == nullptr) {
root->left = createNewNode(y);
return;
} else {
bstInsert(root->left, y);
}
}
if( y > root->val )
{
if(root->right == nullptr) {
root->right = createNewNode(y);
return;
} else {
bstInsert(root->right, y);
}
}
}
int main()
{
node* root = nullptr;
int y;
while(cin >> y) {
bstInsert(root, y);
}
return 0;
}
so you give the clown a ballon
and she gives one to
you i and you trust the clown
to take you to the fair by microsoft
the fair
are you going with y
do you have your thinking cap on
do you see the node in the main
and the insert method the y
with the link aye
we dont
the fair
the fair with all the companies
the 1000 links to 1000 proteins
in haus theyll ask as always
and this will be there with her
dr de root
the fair
and the root
why y
why x
why not xy
that would be a guy
xx a girl
shut up and input for God
James 1 faith and deeds
finish the task
be a bioengineer
an engineer
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)