Find terminal nodes in tree nil if pointer is represented

Assignment Help Data Structure & Algorithms
Reference no: EM1368616

Question 1: List and describe the four steps in Polya's How To Solve It List

Question 2: List the three phases of the computer problem-solving model

Question 3: Distinguish between information and data

Question 4: The table below represents a portion of a computer’s main memory containing a linked list. Each entry consists of two cells, the first being data, the second being a pointer to the next entry. If the nil pointer is represented by 00 and the list’s head pointer contains 52, modify the memory cells so the data at address 56 is inserted at the end of the list.

            Address   Contents

                 50           AA

                 51           00

                 52           BB

                 53           58

                 54           CC

                 55           00

                 56           DD

                 57           00

                 58           EE

 

                 59           54

 

Question 5: The table below represents a portion of a computer's main memory containing a binary tree. Each node consists of three cells, the first being data, the second being a pointer to the node's left child, and the third being a pointer to the node's right child. If the nil pointer is represented by 00 and the tree's root pointer contains 53, how many terminal nodes are in the tree? 

                Address   Contents

                 50           AA

                 51           56

                 52           00

                 53           BB

                 54           00

                 55           50

                 56           CC

                 57           00

                 58           00

Question 6: The table below represents a portion of a computer’s main memory containing a binary tree stored row by row in a contiguous block as described in the chapter. Draw a picture of the tree. 

            Address    Contents

                 50            A

                 51            B

                 52            C

                 53            D

                 54            E

                 55            F

                 56            G

 

7   Distinguish between value and reference parameters.

 

8.  How are arguments and parameters matched?

9. What is written by the following algorithm? 

Push(myStack, 5)

Push(myStack, 4)

Push(myStack, 4)

Pop(myStack, item)

Pop(myStack, item)

Push(myStack, item)

WHILE (NOT IsEmtpy(myStack))

            Pop(myStack, item)

            Write item, ' ' 

10. What is written by the following algorithm? 

Enqueue(myQueue, 5)

Enqueue(myQueue, 4)

Enqueue(myQueue, 4)

Dequeue(myQueue, item)

Dequeue(myQueue, item)

Enqueue(myQueue, item)

WHILE (NOT IsEmtpy(myQueue))

        Dequeue(myQueue, item)

        Write item, ' '

Reference no: EM1368616

Questions Cloud

Which information in computer critical to personal life : Let the information stored in the personal computer. Do you, at this moment, have information stored in your computer that is critical to your personal life?
Explain boiling springs savings bank did a background check : Explain Boiling Springs Savings Bank did a background check on Perimeter before hiring it. Search the Web for sources that can help an organization
Explain some of the differences in the selling process : Explain some of the differences in the selling process that an HP sales rep might face in selling to a long - term established customer verus a prospective customer.
Calculate the cash flows for project : Wheel Industries is planning a 3-year expansion project. The project requires an initial investment of $1.5 million. The project will use straight line depreciation method.
Find terminal nodes in tree nil if pointer is represented : The node's right child. If the nil pointer is represented by 00 and the tree's root pointer contains 53, how many terminal nodes are in tree?
Explain charlie jones a fireman for boulder county : Explain Charlie Jones, a fireman for Boulder County, Colorado, saw an ad for the vacation of his dreams in the local, "Boulder County Gazette."
Effects of cost reduction : Last year, Urbana Corporation had $197,500 of assets, $307,500 of sales, $19,575 of net income, and a debt-to-total assets ratio of 37.5 percent.
Give algorithm-correctness proof-time complexity for tree : Determine the minimum number of nodes in tree to remove so that the tree is separated into subtrees of sizes at most k. Give the algorithm, the correctness proof and the time complexity.
Explain what is the total cost for using air carrier : Explain What is the total cost for using motor carrier transportation and What is the total cost for using air carrier transportation and Which alternative should GasBag use?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Creating financial tracking program

Acme Inc. is making next generation financial tracking program, and Alice has been provided the task of writing encryption component.

  Find cost of sorting the relation

Suppose the cost of seek is 5milliseconds, while the disk transfer rate is 40 mgbytes per second. Find the cost of sorting the relation , in seconds, w/bb = 1 & w/ bb= 100.

  Design time randomized monte carlo algorithm

You have to design an O(n) time randomized Monte Carlo algorithm which computes an (1 + o)- approximate ham-sandwich cut with probability 1 - n-c for any given constant c > 0.

  Online vs. face-to-face classes

Communication A significant distinction between online and face-to-face classes lies in the area of communication.

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Write algorithm find intersection of two singly-linked list

Write an algorithm (pseudocode) to find the intersection of two singly-linked lists. Assume that the data in each list are in nondecreasing order.

  Algorithm to take input m constraints over n variables

For instance, the constraints x1 = x2, x2 = x3, x3 = x4, and x1 6= x4 cannot be satis fied. Give an efficient algorithm that takes as input m constraints over n variables and decides whether the constraints can be satis fied.

  Algorithm to read arbitrary number of data records

Write the algorithm to read arbitrary number of data records, each comprising name, age, and code.

  Algorithm-find schedule to obtain maximum amount of profit

Give an algorithm to find schedule which obtains maximum amount of profit, assuming that all processing times are integers between 1 and n.

  Explain binary tree by induction

Binary tree is full if all of its vertices have either zero or two children. Let Bn denote number of full binary trees with n vertices. Illustrate by induction (substitution) that Bn is 2 (n) .

  Currency conversion development

Currency Conversion Development

  Testing item in array of member using sequential search

Look up each test item in array of member items, by using sequential search. What is the worst-case running time of it. (asymptotically, in terms of n and k)?

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