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

  Sketch dynamic programming tables for knapsack problem

Sketch Dynamic Programming Tables (one for calculating optimal value and one for keeping track of items used in getting optimal value) for 0/1 Knapsack Problem given below and illustrate your final result.

  Create greedy algorithm-multiple breakpoint distance problem

Breakpoints between pi and p. Create greedy algorithm for Multiple Breakpoint Distance problem and estimate its approximation ratio.

  Estimate cost of multi phase multiway merge sort

Find out number of phases needed, and estimate cost of Multi Phase Multiway Merge Sort. Write all BCNF violations. Decompose relations, as essential, into collections of relations whic hare in BCNF.

  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.

  Chinese remainder theory

For RSA signature, let p=17 and q=43. Design a digital signature for the message m=161, where the hashing function is the identity function and the computation at the signer's side is performed through the Chinese Remainder Theory.

  Writing a c program

Create a C program that has a declaration in main() to store the following numbers into an array named channels: 2, 4, 5, 7, 9, 11, 13. There should be a function call to display().

  Creating an exception class and applet file

Create an applet document that prompts the user for an ID number and an age. Construct an Exception class and throw an Exception of that class if the ID is not in the range of valid ID numbers.

  Create algorithm to calculte and print average earnings

Create the algorithm to calculte and print average earnings, lowest earnings, and highest earnings of group of employees. Each input record will contain name and earnings of one employee.

  Design a property database using microsoft access

Database window opens, then type the word Client as the name for this file where the cursor is blinking, then click the create bottom.

  Graph in which every node is pivotal for at least two nodes

Give an example of a graph in which every node is pivotal for at least two di fferent pairs of nodes. Explain your answer.

  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

  Develop the pseudo code need

Develop the pseudo code needed to find the average of ten 8-bit numbers. Use a loop.

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