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

  Find maximum possible amount of money by optimal strategy

Removes it from row permanently, and receives value of coin. Find out the maximum possible amount of money we can definitely win if we move first.

  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.

  Question about site structure

Browse the Web to discover examples of the following site structures Linear and Hierarchical and describe how the content fits the structure.

  Create a flowchart to determine the cause of problems

Assume you are the 1st level help desk technician at a average sized corporations. Your job is to handle the initial calls from corporation  computer users with personal computer related problems.

  Creating a home inventory database

Construct one query of your selection. Remember a query answers a question. As an example, list all household electronics that are greater in value than $200.

  A[0..n-1] and b[0...n-1] are sorted arrays

A[0..n-1] and B[0...n-1] are sorted arrays where each contains n numbers. Design an O(n*log(n)) algorithm to find the median of all elements in arrays X and Y.

  Define a federated database

Define a federated database and discuss why are federated databases becoming increasingly common? Provide examples of databases in your current or previous work environment

  Show state of memory after processes by best fit algorithm

Using the best fit algorithm, show the state of memory after processes of 212K, 417K, 112K and 350K (in request order) arrive.

  Implementing ajax programming

In the AJAX scripts construct, refer to the DSN datasource as flamingo. Even though its not in your own folder or directory, it has been set up as SYSTEM DSN, so your AJAX script will have access to it.

  The class linked bag did not have the data member itemcount

the class LinkedBag did not have the data member itemCount. Revise the method getCurrentSize so that it counts the number of nodes in the linked chain

  Maekawa''s algorithm

Maekawa's Algorithm is used to achieve mutual exclusion for 13 sites. Suppose the sites are labeled 1, 2, ..., 13. Find the request sets R1, R2, ... , R13. Suppose sites 1, 6, 12 want to enter a critical section ( CS ) and they have sent requests in ..

  What is the most difficult part of creating the algorithm

Pseudocode algorithm you would write for a simple task. What do you think is the most difficult part of creating the algorithm? What can you do to make this process easier?

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