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...

SQL Server interview questions along with their answers

1.     What is SQL Server? SQL Server is a relational database management system (RDBMS) developed by Microsoft. It is used to store, retrieve, and manage data efficiently. What is the difference between SQL and SQL Server? SQL (Structured Query Language) is a standard language used to communicate with and manipulate databases. SQL Server is a relational database management system that implements the SQL language.  What are the different types of backups available in SQL Server? SQL Server supports several types of backups, including Full Backup, Differential Backup, Transaction Log Backup, and File or Filegroup Backup. What is normalization in SQL Server? Normalization is the process of organizing data in a database to reduce redundancy and dependency. It helps in improving data integrity and performance.  What is a clustered index? A clustered index determines the physical order of data in a table. A table can have only one clustered index, and it...

MASTER OF COMPUTER APPLICATION

  For Assignment Solution Contact Niraj kumar Call and whatsapp  (9899682018) Mail:-Nirajkumar294@gmail.com   ASSIGNMENT DRIVE SPRING 2019 PROGRAM MASTER OF COMPUTER APPLICATION SEMESTER III SUBJECT CODE & NAME MCA313 - LINUX OS BK ID B1563 NUMBER OF ASSIGNMNETS, CREDITS & MARKS 1, 2 Credits, 30 marks Note –Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme. Q. No Assignment Questions Marks Total Marks 1 List any ten commonly used commands along with their functions in Linux. 10*1 10 2 Describe about Run levels. Explain different run levels. 3+7 10 3 Describe the following: a)     File encrypt...