What is an Algorithm in Computer science ?

Nirbhay Singh
5 min readJan 18, 2023

An algorithm is a set of instructions or a step-by-step procedure for solving a specific problem or completing a specific task.

In computer science, an algorithm is a sequence of operations that a computer can perform to solve a problem or accomplish a task.

An algorithm must have the following characteristics:

  • It must take some input and produce some output.
  • It must be effective, meaning that each step must be precisely defined and clear to understand.
  • It must terminate after a finite number of steps.

Algorithms can be written in any programming language, and they can be used for a wide variety of tasks, such as sorting data, searching for information, and encrypting and decrypting data. Algorithms can also be used to control the behavior of robots, drones and other computer-controlled systems.

Algorithms can be categorized into different types, such as:

  • Search Algorithms: These are used to search for specific data within a larger dataset. Examples include linear search and binary search.
  • Sort Algorithms: These are used to sort data in a specific order. Examples include bubble sort, insertion sort, and quicksort.
  • Graph Algorithms: These are used to work with graph data structures and perform tasks such as finding the shortest path between two nodes.
  • Cryptographic Algorithms: These are…

--

--

Nirbhay Singh

Technophile, DevOps Consultant at Deloitte, talks about DevOps, Cloud, Site Reliability Engineer, Linux and Programming.