Data structures and Algorithms overview

In order to proceed with DSA (Data structures and Algorithms) you have to have some basic programming background. It is not always the case. You  can learn the concepts of DSA prior to learning programming. But personally I do not recommend the latter. Just an personal opinion. Lets understand the things very simply. ;)


Data structure 

Normally in a computer program, no matter in what language you write it we need data to work with. These data can be variables (int x= 25, String firstName = "kalpa" , boolean isSignedIn = false) or data that we store in a database (may be in an xml file , database like mySQL or simply a text file). Amount of data and the complexity of data increase the with program scale and complexity. For example when you code a basic calculator you may need some ints doubles, floats. But when it comes to enterprise level real time banking mobile application nature of data differs. 

So not all the data are alike. These data has to be stored in some sort of manner in order to use it. Hence we need some kind of structure to hold on that data. (no matter the data is in variables or a database).





Simply saying you cant store eggs and oranges in the same manner. You need specific structures to each type. Read more about DS from here.

Algorithms

Well, the name seems cool mathematicy, cody and geeky. But in simple terms an algorithm is way of solving a problems. In day to day life we use algorithms all the time. For example when we want to tie our shoes we have certain way answering that problem. You take the shoe laces tie it in a certain fashion. VIOLA ! your shoe is laced. :D all the time, in every nook and corner in the world this algorithm is the same. 
Algoithm can be simple as this

or it can be complex as this. :D

Normally algorithms are kind complex. ;)

Algorithms can be used with data structure also.
  • To insert a new data item (Adding a new orange to the orange basket basket)
  • To search for a specific data item (search a specific orange from the basket. This may take some time depending in how you have strucutred your oranges)
  • To delete a data item (get an odd yellow colored orange and throw it to garbage can.)
For more on algos read some from here



Share:

0 comments: