Chapter-1 (Algorithms)



Question: What is Algorithms?

Answer: An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values as output." In other words, algorithms are like road maps for accomplishing a given, well-defined task.

Question: What is the use of Algorithms?

Answer:

It gives Steps to solve a problem. We can Say Algorithms is a step by step process.
We can think to make algorithms on “How to make tea”.

Question: How to develop algorithms to solve a problem, Illustrate with example?

Answer:

“How to make a tea”- Algorithms

Step 1: Take Some amount of Water in a pan and boil it,

Step 2: Add some tea leafs and again boil for some time,

Step 3: Filter the water in a cup and add sugar in it,

Step 4: Add boiled Milk in the cup.

Step 5: Tea is ready to serve. ~~~