binary-search-tree
BinarySearchTree searching speed efficiency
import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Random;[详细]
2023-03-06 05:53 分类:问答Find the node that has next value of current node value in Binary Search Tree
I have BST of BTNode<E>\'s each has double number and I have the following fields: BTNode <E> root: a pointer to the root of the tree[详细]
2023-03-04 09:17 分类:问答Issues with comparing two generic objects
My project is a Phonebook that is using BSTree<E>. Each node of the tree is BTNode<E>. In the main class, I replace E with Pair class, which has (String name, String number), when I define[详细]
2023-03-03 20:47 分类:问答How to find the index of an element in sorted set?
I can find an element in a sorted set (backed by BST) in O(logN). Now I would like the index of this element. For example, in set {1, 3, 4, 10}, the index of 4 is 2 and the index of 1 is 0.[详细]
2023-03-03 17:37 分类:问答help with insert on first BST
EDIT there a small thing that I am missing!! the error is still there So I am attempting to learn how to code my first BST, and it is hard.... I am already having trouble with just a few lines of cod[详细]
2023-03-01 02:39 分类:问答insert on first BST giving end of no-void function errror?
So I am attempting to learn how to code my first BST, and it is hard.... I am already having trouble with just a few lines of codes. the problem is in the insert, but I have included everything so tha[详细]
2023-02-28 18:56 分类:问答Intersection of 2 binary search trees
Hey, So I want to create a new tree which is basically the intersection (mathematical definition of intersection) of 2 given binary search trees. I have a method that prints out all the nodes at a par[详细]
2023-02-27 14:04 分类:问答Segmentation fault in a Binary Tree
Either I\'ve been staring at this code for way too long or I just can\'t figure this one out.but when I use an 8000 number text file in descending order; 8000, 7999, ... I get a segmentation fault in[详细]
2023-02-27 01:01 分类:问答Parsing and building S-Expressions using Sets and binary search tree
This is pseudo homework (it\'s extra credit).I\'ve got a BST which is an index of words that point to the lines (stored somewhere else) that contain the words.I need to implement a way to search using[详细]
2023-02-25 21:34 分类:问答getting segmentation fault in searching an element in binary search tree in c++
node ** BST :: searchElement(node **tree, int item) { if( ((*tree)->data == item) || ( (*tree) == NULL) )[详细]
2023-02-25 15:56 分类:问答