Algorithms: The basic of coding

Algorithms are the basic of developing any particular source code in any project. It helps us to know the logic behind code.

Originally published in en
Reactions 0
727
DT
DT 31 Dec, 2019 | 1 min read

The algorithm basically gives the user the logic behind solving any particular problem. Algorithms are basic for developing any source code.

Algorithms are generally created irrespective of any particular programming language and it is a step by step procedure, which defines a set of instructions to be executed in particular order to get desired output.

There are various types of the algorithm such as Searching, Sorting, Inserting, Deleting, Updating the list of elements.

A proper algorithm should be unambiguous, have well-defined input and output, finite in nature, feasible and its steps should be independent.

After writing an algorithm for a particular question you can analyze the complexity of it on the basis of two factors :

1. Time Complexity

2. Space Complexity

These are two factors based on which the complexity of an algorithm is defined.

Time complexity defines the amount of time taken by code to run. It is defined with the notation of theta.

Space Complexity defines the amount of space taken by code while it is running.

0 likes

Published By

DT

DT

Comments

Appreciate the author by telling what you feel about the post 💓

Please Login or Create a free account to comment.