answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How many cases are considered for deleting a node from a binary search tree?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between extended binary tree and a binary search tree?

A strictly binary tree is one where every node other than the leaves has exactly 2 child nodes. Such trees are also known as 2-trees or full binary trees. An extended binary tree is a tree that has been transformed into a full binary tree. This transformation is achieved by inserting special "external" nodes such that every "internal" node has exactly two children.


Advantages of binary search over sequencial search?

Linear search takes linear time with a worst case of O(n) for n items, and an average of O(n/2). Binary search takes logarithmic time, with a worst and average case of O(n log n). Binary search is therefore faster on average.


Why would you write a program using array processing linear search and binary search of an array?

A linear search is effective when the order of elements in an array are not sorted by the value you are looking for. A binary search is effective when the order of elements is sorted by the value you are looking for.Linear search sample data: 8 3 9 12 4 10 38 2 1 93 56 34Binary search sample data: 1 2 3 4 8 9 10 12 34 38 56 93In the first set of data, unsorted data cannot be searched using binary search. To find the value 38, a program must go through each element until it locates the 7th element; this is a total of 7 iterations. This method is effective when data is constantly being added and removed, and the overhead of a sorting algorithm would be less efficient than a binary search.In the second set of data, the value 38 can be found by binary search. In the first iteration, a binary halfway point is found (we will choose element 6). Since 9 is less than 38, we know we need to go up. There are six remaining values, so we look at the 9th element (starting from the 6th element, there are six more, so we go half-way, 3 more, a total of 9). Here, we see the value is 34, still less than 38. There are three values remaining, so we go up 2 more. For the third iteration, the value is 56, which is more than our target of 38. Since we advanced 2 last time, we will decrease by 1 this time, and our fourth iteration will find the value 38.As a matter of fact, in this data set, we will always find our answer in at most 4 iterations, while in the linear search, only the first 4 elements have a chance of being more efficient than the binary search. The problem then comes to down to if the sorting and binary search combined is faster than the linear search. For large data sets that are mostly static, binary searching is preferred. For rapidly changing data sets that would need constant sorting, a linear search may be preferred.Note that if the data insertion algorithm maintains the sort order (by inserting each element at the correct index in memory), binary searching will likely be faster in the majority of cases. One can use a binary search for data insertion points, keeping the cost of data insertion minimized (but not as efficient as simply appending to the end) while maximizing search capabilities.


What are the differences between binary signaling and digital signaling?

Binary refers to a system which may have one of two states. In computer science the binary numbering system is used where stored and communicated values are represented by 0 and 1. A digital signaling system would be based on an underlying stream of binary numbers so in most cases the two would be used interchangeably. If "binary signaling" where to be taken literally however it would describe a signaling system which communicates two possible states. The flag on a mailbox is a binary communication system, when the flag is up it signals that mail is available for pickup, when it is down there is nothing in the mailbox.


How do you overcome drawbacks of linked list?

Overcoming the "drawbacks" of a linked list requires knowing what drawback is at stack. If you need to iterate backwards as well as forwards, then you could create a doubly linked list. If you need to search for elements quickly, then you could implement a binary tree. If you have a static size, then you could implement an array. It's all a matter of tradeoff, and of what your particular issue is... Its badsector... According to my self disadvantage of link list that searching in link list is sequential if you compare it with arrays its very slow. Because in link list we have to search every node for that. if any one uses binary tree that is in some cases more faster than arrays.

Related questions

What is the difference between extended binary tree and a binary search tree?

A strictly binary tree is one where every node other than the leaves has exactly 2 child nodes. Such trees are also known as 2-trees or full binary trees. An extended binary tree is a tree that has been transformed into a full binary tree. This transformation is achieved by inserting special "external" nodes such that every "internal" node has exactly two children.


Do scientist believe a binary star produces a nova?

A binary star may, or may not, be related to a nova or supernova. In some specific cases, a supernova is specifically caused by a close binary system; but not all binary systems result in novas, and not all novas come from binary stars.


What is the difference between avl tree and binary tree?

A binary tree is a tree data structure in which each node has at most two children. Typically the child nodes are called left and right. One common use of binary trees is binary search trees; another is binary heaps. A binary search tree (BST) is a binary tree data structure which has the following properties: ->each node has a value; ->a total order is defined on these values; ->the left subtree of a node contains only values less than the node's value; ->the right subtree of a node contains only values greater than or equal to the node's value. An AVL tree is a self-balancing binary search tree. In an AVL tree the heights of the two child subtrees of any node differ by at most one, therefore it is also called height-balanced. Lookup, insertion, and deletion all take O(log n) time in both the average and worst cases. Additions and deletions may require the tree to be rebalanced by one or more tree rotations.


Advantages of binary search over sequencial search?

Linear search takes linear time with a worst case of O(n) for n items, and an average of O(n/2). Binary search takes logarithmic time, with a worst and average case of O(n log n). Binary search is therefore faster on average.


How do i delete my zedge account when i forgot my password?

Why bother deleting it ? -In most cases if you don't use it for a year it will automatically delete.


Why would you write a program using array processing linear search and binary search of an array?

A linear search is effective when the order of elements in an array are not sorted by the value you are looking for. A binary search is effective when the order of elements is sorted by the value you are looking for.Linear search sample data: 8 3 9 12 4 10 38 2 1 93 56 34Binary search sample data: 1 2 3 4 8 9 10 12 34 38 56 93In the first set of data, unsorted data cannot be searched using binary search. To find the value 38, a program must go through each element until it locates the 7th element; this is a total of 7 iterations. This method is effective when data is constantly being added and removed, and the overhead of a sorting algorithm would be less efficient than a binary search.In the second set of data, the value 38 can be found by binary search. In the first iteration, a binary halfway point is found (we will choose element 6). Since 9 is less than 38, we know we need to go up. There are six remaining values, so we look at the 9th element (starting from the 6th element, there are six more, so we go half-way, 3 more, a total of 9). Here, we see the value is 34, still less than 38. There are three values remaining, so we go up 2 more. For the third iteration, the value is 56, which is more than our target of 38. Since we advanced 2 last time, we will decrease by 1 this time, and our fourth iteration will find the value 38.As a matter of fact, in this data set, we will always find our answer in at most 4 iterations, while in the linear search, only the first 4 elements have a chance of being more efficient than the binary search. The problem then comes to down to if the sorting and binary search combined is faster than the linear search. For large data sets that are mostly static, binary searching is preferred. For rapidly changing data sets that would need constant sorting, a linear search may be preferred.Note that if the data insertion algorithm maintains the sort order (by inserting each element at the correct index in memory), binary searching will likely be faster in the majority of cases. One can use a binary search for data insertion points, keeping the cost of data insertion minimized (but not as efficient as simply appending to the end) while maximizing search capabilities.


What can a security guard search?

Private security is not limited by search and seizure laws in most cases.


How do you search for beefy laptop cases online?

The most durable laptop cases are Pelican Laptop Cases. They are crushproof and waterproof. See the related link.


Where can you get an otterbox?

Search for iPod Touch otter box cases on Amazon.


Is working with a sibling considered conflict of interest?

It depends on the context. In most cases, no, but there are cases where it could be.


Why would you build a package from its source code when a (binary) rpm file is available?

Usually the cases are that the source code versions are newer than what is provided by the repositories. Also, you can't readily tell what is in the binary-only builds as everything's done for you. In most cases is that the specific software package may not be available in the repositories that warrants a "build from source".


Why would you build a package from its source code when a binary rpm file available?

Usually the cases are that the source code versions are newer than what is provided by the repositories. Also, you can't readily tell what is in the binary-only builds as everything's done for you. In most cases is that the specific software package may not be available in the repositories that warrants a "build from source".