Taxonomy tree as its input and returns a string

Assignment Help Data Structure & Algorithms
Reference no: EM13166890

Designing an algorithm that takes a taxonomy tree as its input and returns a string that contains the type of "item" (animal, plant, etc) that was found after traversing the tree. The tree will be inputted as a fixed size array of strings, you will have an additional parameter of type size_t called size.

Your algorithm will read the string that is contained in the array and print it to the screen as a question. You will then accept input from the user in the form of yes or no (you can decide what representation to use, but inform the user what to type for yes and no). If the user answers yes, you will go to the left child, if they answer no you will go to the right child. Once a leaf is reached you know that you have your result.

remember that an algorithm is pseudocode.

Also, list the time complexity for your algorithm.

Reference no: EM13166890

Questions Cloud

How many kilograms of calcium are there in a 173-pound man : If 1.4% of the mass of a human body is calcium, how many kilograms of calcium are there in a 173-pound man?
Determine which half-cell will undergo oxidation : Determine which half-cell will undergo oxidation and which will undergo reduction, identify anode and cathode, and calculate the voltage for the cell.
What is the pressure in the can : An aerosol spray can with a volume of 456 mL contains 3.09 g of propane gas (C3H8) as a propellant. If the can is at 23°C, what is the pressure in the can? What volume would the propane occupy at STP?
Calculate the mass of agcl and h2s formed : calculate the mass of agcl and h2s formed when 85.6 g of ag2s reacts with excess hcl.
Taxonomy tree as its input and returns a string : Designing an algorithm that takes a taxonomy tree as its input and returns a string that contains the type of "item" (animal, plant, etc) that was found after traversing the tree.
How many grams of acetylene are produced : how many grams of acetylene are produced by adding water to 5g of CaC2?
List the chemical names and number of atoms : List the chemical names and number of atoms for each chemical for each of the following equations.
What is the mass of the liquid left over : There is 12.0 g CCl3F in a 1.1 L container at 856 torr and 300 K. What is the mass of the liquid left over?
Write the definition of a method : Write the definition of a method , isReverse , whose two parameters are arrays of integers of equal size. The method returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.)

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  The time delay of a long-distance

The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication links on the telephone network between the caller and callee

  What is the machine run time in second for sorting array

Write computer program to implement this algorithm and demonstrate the results and what is the machine run time in second for sorting array A

  Determining ciphertext generated by encryption

Determine ciphertext (in binary form) generated by encryption of character X?

  Describe the need for complex data structures

Describe the need for complex data structures and how they are used. Describe the design and application of arrays and how the array simplifies program development.

  Design a nonrecursive algorithm

Design a nonrecursive algorithm that visits all the nodes of a general multiway tree in level order: that is, level-by-level, going left-to-right across a level.

  Write a program that checks if left and right braces

Write a program that checks if left and right braces, brackets, and parentheses are balanced

  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)?

  Creating financial tracking program

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

  Create algorithm-smallest element-set of combined elements

Assume that X and Y are two sorted sequences, comprising m and n elements respectively. Create the algorithm to nd kth smallest element in set of m + n combined elements.

  Describe sorting algorithm to be parsimonious

Describe a sorting algorithm to be parsimonious if it never compares same pair of input values twice. (Supose that all the values being sorted are distinct.).

  Portfolio planning using optimization

Set this problem up as a linear programming model in Excel, and use Solver to determine how the $10 million should be invested. What is the overall return (in dollars terms)

  Evaluate the average complexity of an enqueue operation

Evaluate the average complexity of an enqueue operation. Determine the average complexity of the dequeue (remove) operation.

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