Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Node *findMinRec(Node* root, int d, unsigned depth)
// in this subtree
return minNode(root,
findMinRec(root->left, d, depth+1),
findMinRec(root->right, d, depth+1), d);
findMinRec(root->right, d, depth+1), cd);
}

// A wrapper over findMinRec(). Returns minimum of d'th dimension
Expand Down Expand Up @@ -225,7 +225,7 @@ int main()
//Testing out minimum value in a 3-dimensional tree.
struct Node *minVal = NULL;
findMin(root, 3);
cout << "(" << root->point[0] << "," << root->point[1] <<"," << root->point[3] << ")" << endl;
cout << "(" << root->point[0] << "," << root->point[1] <<"," << root->point[2] << ")" << endl;


//Testing the search functionality of a 3-dimensional Tree.
Expand All @@ -245,9 +245,9 @@ int main()
root = deleteNode(root, points[0]);

cout << "Root after deletion of (" << origRoot->point[0] <<"," << origRoot->point[1] <<"," << origRoot->point[2] << ")\n";
cout << root->point[0] << "," << root->point[1] <<"," << root->point[3] << endl;
cout << root->point[0] << "," << root->point[1] <<"," << root->point[2] << endl;



return 0;
}
}