Skip to main content

Define algorithm and write a note on Complexity and Time- Space Tradeoff with example.


ASSIGNMENT SET -2
Q.1.Define algorithm and write a note on Complexity and Time- Space Tradeoff with example.
Answer:- Algorithm is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. Algorithms are generally created independent of underlying languages, i.e. an algorithm can be implemented in more than one programming language.
From the data structure point of view, following are some important categories of algorithms −
Search − Algorithm to search an item in a data structure.
Sort − Algorithm to sort items in a certain order.
Insert − Algorithm to insert item in a data structure.
Update − Algorithm to update an existing item in a data structure.
Delete − Algorithm to delete an existing item from a data structure.
Characteristics of an Algorithm
Not all procedures can be called an algorithm. An algorithm should have the following characteristics −
Unambiguous − Algorithm should be clear and unambiguous. Each of its steps (or phases), and their inputs/outputs should be clear and must lead to only one meaning.
Input − an algorithm should have 0 or more well-defined inputs.
Output − an algorithm should have 1 or more well-defined outputs, and should match the desired output.
Finiteness − Algorithms must terminate after a finite number of steps.
Feasibility − should be feasible with the available resources.
Independent − an algorithm should have step-by-step directions, which should be independent of any programming code.
How to Write an Algorithm?
There are no well-defined standards for writing algorithms. Rather, it is problem and resource dependent. Algorithms are never written to support a particular programming code.

Comments

Popular posts from this blog

For Assignment Solution Contact Omegaitsolution.com https://www.omegaitsolution.com 9899682018 DEC 2018 NMIMS Solved Assignments,

For Assignment Solution Contact Omegaitsolution.com https://www.omegaitsolution.com 9899682018 1. The manager of a company was analysing the trend of the products of its company (Commodity Y) getting replaced by another substitute product available in the market which gives the same level of satisfaction to the consumers. Calculate the rate of Marginal Rate of Substitution and analyse the result. Combination Units of Commodity Y Units of Commodity X Total Utility a 40 10 U b 25 14 U c 17 19 U d 10 27 U e 7 38 U 2. Neha has just completed her MBA and joined a startup company. The company was planning to launch a new product in the market so the management wanted to understand the different factors that can impact the demand and supply of their products in the market. Help Neha to prepare a report on the factors impacting d

Networking interview questions .

What is LAN? LAN is a computer network that spans a relatively small area. Most LANs are confined to a single building or group of buildings. However, one LAN can be connected to other LANs over any distance via telephone lines and radio waves. A system of LANs connected in this way is called a wide-area network (WAN). Most LANs connect workstations and personal computers. Each node (individual computer) in a LAN has its own CPU with which it executes programs, but it also is able to access data and devices anywhere on the LAN. This means that many users can share expensive devices, such as laser printers, as well as data. Users can also use the LAN to communicate with each other, by sending e-mail or engaging in chat sessions. What's the difference Between an Intranet and the Internet? There's one major distinction between an intranet and the Internet: The Internet is an open, public space, while an intranet is designed to be a private space. An intranet may b

For Assignment Solution Contact Niraj kumar Call and whatsapp (9899682018) Mail:-Nirajkumar294@gmail.com

GET SOLVED ASSIGNMENTS AT NOMINAL COST For Assignment Solution Contact Niraj kumar Call and whatsapp (9899682018) Mail:-Nirajkumar294@gmail.com INTERNAL ASSIGNMENT APPLICABLE FOR JUNE 2019 EXAMINATION SEMESTER 2 ASSIGNMENTS Marketing Management 1. Assume you plan to purchase a new car for personal use. This will be the first car that you will be purchasing. Discuss various steps of consumer buying process that will be involved in purchasing a car.  2. M/s Furnideas wishes to sell furniture in the Indian Market. The company is known for their innovative ideas in furniture. The company has a global presence in selling furniture. The company sells to High, Middle and Lower Income group in different countries based on the segmentation. Furnideas appoints you as a consultant to guide them on types of segmentation that they should use for their furniture. 3. M/s Furnideas (as given in question 2) wants to promote its brand and products to create awareness and increase the sale of i