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

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Calculate worst-case run-time complexity of algorithm

Calculate the worst-case run-time complexity of your algorithm and prove optimality of the solution it gives. Suppose that the road is a straight line with a western end and an eastern end.

  Determining hash value of modified file

Determine hash value of modified file look like, as compared with original hash value?

  Generalize 2-3 algorithms for insert and delete

Generalize the 2-3 algorithms for INSERT and DELETE to K-J trees, where non-leaf vertices have between K and J children for fixed integers K >=2, and J>= 2K-1.

  Sort scheduling algorithms according to high throughput

Sort the scheduling algorithms (FCFS, SPF, RR, MLFB) according to each of High throughput (if we take averages of time intervals smaller than the sum of all processes' time)

  Compare the average behavior of insertion sort

Compare the average behavior of insertion sort for n elements with that of the n insertions into an initially-empty straight array implementation of a priority queue

  Encryption feistel cipher and decryption algorithm

If this is psudocode for encryption feistel cipher determine decryption algorithm?Output: ciphertext = (left[16], right[16]) Explain pseudo-code of corresponding decryption algorithm for this cipher.

  What are entity-relationship diagrams

What are entity-relationship diagrams, and how are they used? Discuss the ethical issues to consider when planning a database.

  Demonstrate a decision tree or table

Demonstrate a decision tree or table

  What is minimum number of nodes expanded for bfs and dfs

Consider the following graph representing the state space and operators of a navigation problem: What is the minimum number of nodes expanded and the storage needed for BFS and DFS?

  Design algorithm to solve spectral assembly problem

Design an algorithm to solve the Spectral Assembly problem under the above conditions. Does the problem have a unique solution?

  Writing algorithm which ?nds xbest

Provide an O(n) algorithm which ?nds xbest such that distbest:= ∑i=1 to n|xbest - xi| is as small as possible.

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