Nodes of a binary tree in level-order

Assignment Help Basic Computer Science
Reference no: EM13968097

1. Write a routine to list out the nodes of a binary tree in level-order. List the root, then nodes at depth 1, followed by nodes at depth 2, and so on. You must do this in linear time. Prove your time bound.

2. * a. Write a routine to perform insertion into a B-tree.

* b. Write a routine to perform deletion from a B-tree. When an item is deleted, is it necessary to update information in the internal nodes?

* c. Modify your insertion routine so that if an attempt is made to add into a node that already has M entries, a search is performed for a sibling with less than M children before the node is split.

Reference no: EM13968097

Questions Cloud

Modify the binary search tree to support : Suppose we want to add the operation findKth to our repertoire. The opera- tion findKth(k) returns the kth smallest item in the tree. Assume all items are distinct. Explain how to modify the binary search tree to support this opera- tion in O(log ..
How does each sort of capital assist in start up : What sorts of asset or capital availability for a new business owner-small start up. How does each sort of capital assist in start up and continuing business operation over the first few years.
Describe a method to perform insertion : A B∗-tree of order M is a B-tree in which each interior node has between 2M/3 and M children. Describe a method to perform insertion into a  B∗-tree.
What is the distance between the observer : What is the distance between the observer and Q? 2) how much elevation did the plane gain between P and Q?
Nodes of a binary tree in level-order : 1. Write a routine to list out the nodes of a binary tree in level-order. List the root, then nodes at depth 1, followed by nodes at depth 2, and so on. You must do this in linear time. Prove your time bound.
General-purpose tree-drawing program : Write a general-purpose tree-drawing program that will convert a tree into the following graph-assembler instructions:
Find the profit from operating the shop : Also, the shop will lose $75 per day at a sales level of x=0. Find the profit from operating the shop at a sales level of x ties per day.
Assigning the inorder traversal number : a. The x coordinate can be computed by assigning the inorder traversal number. Write a routine to do this for each node in the tree. b. The y coordinate can be computed by using the negative of the depth of the node. Write a routine to do this for ea..
How do you think twitter uses a data warehouse : Do you agree that a business can use Twitter to gain business intelligence? How many companies do you think are aware of Twitter and exactly how they can use it to gain BI? How do you think Twitter uses a data warehouse?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create a program to keep track of the participants

Create a program to keep track of the participants in a triathlon. Your program will keep track of the times in three events: Running, Swimming, and Biking.

  Demonstrate ability to collaborate with peers to analyse and

Demonstrate ability to collaborate with peers to analyse and solve business problems with information technologies, and present the solution in a team report.

  Prove or disprove: every increasing function

Prove or disprove: every increasing function

  Find last ant to fall off the rod

Find last ant to fall off the rod - Output a single integer which is the index (lower index in case two ants are falling simultaneously in the end) of the last ant to fall off.

  Describe the major components of a datawarehouse

Briefly describe the major components of a datawarehouse architecture. Explain how the volatility of a datawarehouse is different from the volatility of a database for an operational information system. Please cite sources if any used.

  Snmp acceptance short paper

SNMP initially appeared in 1988, but it did not receive widespread adoption. What have been the issues with SNMP, and have they been addressed? How widely used is SNMP now? Find some examples of tools that use SNMP.

  What happens when the federal reserve buys

Fill in the table below to show what happens when the Federal Reserve buys $200,000 in securities when the reserve rate is 5%.  Use appropriate labels and then explain each step below your entries.  Assume that all excess reserves are loaned out. NEE..

  Function 2n3 - 18n is o(n3)

Argue why the following is true:Function 2n3 - 18n is O(n3) and also it is O(n4) but it is not O(n2log n).

  Design a program that asks for the price of each item

Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of the sales tax and the total.

  The implementation of a shared memory

The implementation of a shared memory

  Demonstrate an understanding of existing strategic impact

Demonstrate an understanding of existing and emerging information technologies and strategic impact on organizational operations. Explain how to develop reasoned responses to the major forces shaping the role of IT in organizations competing in a ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd