INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS


Data Structures & Algorithms:-






Introduction :

1. This is the first post and introductory post on data structures and algorithms famous with the slang name "DS Algo".


2. If you are a programmer/computer scientist/IT professional/student of computer  science or IT field then it's a must for you to learn Data Structures and Algorithms.


3. But why should you learn DS-Algo ? Well, here is the answer. 
It is one of the most important part of the computer science and programming field, because it mainly helps a computer scientist or a developer to write the logic for his project and to find the most efficient method to solve the problem in his project.


So, Let's get started with the basics.





What is data structures ?

The meaning is in the name itself. The structure or way to arrange or organize data set. Where data can be some set of numbers, strings, or a custom data type depending on the use case of the developer. (We will talk about custom data types in future posts)


Eg. Array, linked list, stack, etc.
(if you are already from coding background you may have heard of these data structure examples, but if you haven't heard of them, don't worry we will cover them in later posts).




What is Algorithm ?

Our very own Wikipedia says,
"In mathematics and computer science, an algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation."


Seems too complex ? Let me make it simpler.
It's just a set of instructions that need to be followed to execute some task.


Example of algorithm can be as simple as telling a robot how to make tea.


Step 1: Take a sauce pan, add water, sugar and tea power in it.
Step 2: Let the mixture boil, and wait till it becomes brown or dark brown depending on how strong tea you want.
Step 3: pour some milk into mixture and stir it well.
Step 4: Serve and enjoy you tea.


This was an algorithm to make tea.
Now, let's write an algorithm to add two given numbers.


Step 1: create two variables say variable A and variable B (containers that can hold numbers.
Step 2: accept values from user to add numbers.
Step 3: perform this add operation A + B.
Step 4: print the sum as output to the user.


This is how we write algorithms.(We will see more examples and algorithm problems in later posts).


In the next post we will look at some technical terms about data structures. Till then keep learning keep growing.








Post a Comment

0 Comments