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

  Algorithm to minimize average difference between height

The problem is to assign each skier a ski to minimize the average difference between height of a skier and his/her ski. Give pseudocode and write its asymptotic running time.

  Program for stack by using dynamically allocated array

Write a C++ class which implements stack by using a dynamically allocated array. Initial size of particular stack must be determined when it is created.

  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.

  Create a binary search tree program

Creating a Binary Search Tree program - Finding the largest and smallest values in the tree Add two class methods

  Create long queue-customers dequeue to next counter

Write a program to simulate a grocery store checkout counter. Construct one long queue from which customers dequeue to the next available counter.

  Creating algorithm broken into sequence of words

Katt wishes you to create an algorithm that, given a string X, determines efficiently how many ways X can be broken up into sequence of words.

  Pseudocode for divide-and-conquer algorithm

Write a pseudocode for a divide-and-conquer algorithm for finding the position of the largest element in an array of n numbers.

  Polynomial time algorithm for rooted directed acyclic graphs

Illustrate that if you were given a polynomial time algorithm for determining whether two rooted directed acyclic graphs are isomorphic, then polynomial time algorithm for testing.

  Explaining elementary operations used in algorithm

How many elementary operations are used in algorithm given below? The elementary operations are comparison operations (such as > and

  Write an algorithm to count nodes in a linked list

storage pool and that there is a special null value. Write an algorithm to count the nodes in a linked list with first node pointed to by first."

  Explaining view of header and footer areas of worksheet

In which view can you see header and footer areas of worksheet?

  Create ef?cient algorithm to fnd redundancies

Fnd the redundancies m1, · · · , mn that are within the available budget and that maximize probability that system works correctly. Create an ef?cient algorithm.

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