Showing posts from January, 2018

DS & A (Algorithm Evaluation)

| Algorithm Evaluation - CHAPTER 3 | I am pretty sure that by this point most of you guys are familiar with the basic terms necessary for learning Data Structures and Algorithms. (If not you can check the previous chapters)
As I mentioned in the last post that an algorithm is an unambiguous series of concrete steps to solve a class of problems, which in simple language can be defined to be a method to solve a problem. But if it is a method to solve a problem, and since in most cases there exists more than one solution to a problem, doesn't that mean that there is more than one algorithm for a particular problem?

The answer is "yes", there is generally more than one algorithm for a particular problem. And that brings us to the topic of Algorithm Evaluation.

Why do we need Algorithm Evaluation?

The answer is pretty simple, we need Algorithm Evaluation to find the best (or a reasonable and valid) algorithm by comparing the available algorithms for a particular problem.

Real l…

DS & A (Problems, Algorithms and Programs)

| CHAPTER 2 | As the header says this post is all about the terminologies: Problems, Algorithms, and Programs. I know many of you guys might think it's basic knowledge, but I still decided to dedicate a post to those terms because it is really important for someone learning Data Structures to know the precise meaning of those terms. So, Let's begin What is a Problem?
A problem can be simply defined as a task to be performed. Can be thought of a collection inputs and corresponding outputs.A problem definition should include constraints on the resources that may be consumed by any acceptable solution. What is an Algorithm?
An algorithm can be generally defined as a method to solve a problem.
Now, let's make the definition more specific. A more specific definition would be, algorithms are an unambiguous series of concrete steps to solve a class of problems.
Properties of an algorithm : Should be correctThere should be no ambiguitySeries of Concrete stepsA finite number of steps /…

Share on Social Media