## Sunday 2 January 2011

### Data structure - an Introduction

Although we don’t need to understand what is an data structure to actually design algorithms. We need a small introduction to data structures before getting full fledged into algorithms. so i will mix data structure as well in coming blog entries.

Metaphor

As i explained previously, in a cooking perspective, data is the ingredients and data structure is study about how much of the ingredients can mix up to give correct blend. This shows that selection of data structure is an art with science rather than pure science like an algorithm. You need to select the right data structure for the right algorithm based on the size and type of the input.

The different input forms for computer is, stream input(in the form of text), block input (in the form of file), device input (through the system ports). All these type of inputs come with lots of data which is represented using a data structure.

Some explanation

In mathematics, there are different type of data representation like matrix, sets, log tables etc. Similarly, for computers, there are data representation like stack, dynamic sets, dictionary, trees, key-value pair etc. which can be effectively used for the operations of the algorithm. Many of these data structures are specific to computer field and mostly used for data representation in practical computer programs. There are also some complex data representation like graphs which is used in electrical/electronics field. This graph data representation is also used by some computer algorithms for purposes like finding out the shortest path in a map etc..

When it comes to making an algorithm to a practical implementation, data structures becomes a big necessity.

DJ Mix of Algorithms & Data structures

From tomorrow’s article, we will start mixing Algorithms and Data structure subjects side by side so that, it can be easily understood. Explaining data structure itself requires a separate blog, but i don’t want to go too deep into it as it will dive into even Data bases subject. So, we will mix the essential data structure now-and-then so that we get the practical use of it in real world algorithms.

As i said, we need to do a proper DJ mix to get this expertise.

Start DJing as you would have got that experience in the New year party Yesterday!!

Enjoy the end of the first weekend in 2011..