Author Box
Articles Categories
All Categories
Articles Resources

Data Structures: The Glue That Joins Algorithms With Data

December 15, 2011 | Comments: 0 | Views: 93

How to design better algorithms? This is one of the basic questions that haunt every programmer. Even software designers want better algorithms. But how do we say that one algorithm is better than the other? Is it not sufficient that the work is done, and the problem is solved? Not always. Suppose I can solve the problem in 5 years and somebody else comes with a solution in 5 minutes, whom will you prefer? It is not a question of fast computers, but fast algorithms.

The fastness of an algorithm is measured in terms of its complexity. An algorithm with logarithmic time complexity is considered better than an algorithm with polynomial time complexity and so on. We will not dwell in the forests of complexity here, may be in another article.

Here the point is, for designing better algorithms, powerful data structures are needed. They organize the data in optimal ways and allow access to this data in easy ways.

Most commonly used data structures are arrays, stacks, queues, trees and linked lists.

They appear in various other applications as basic components.

The study of data structures is a very demanding and challenging field.

Another important thing you should remember is that data structures and algorithms can be thought of independent of languages. That is you can implement a data structure, or an algorithm in C, C++ or java, subject to the restrictions put forward by that language.

Let us see some of the data structures in a bit more detail.

1. Arrays:

An array is used to store items of the same type. You can access items randomly. But insertion or deletion from the middle is a problem. Also you have to know the size of the array in advance.

2. Linked lists

Linked lists offer a much flexible method of storing and retrieving data.

You are free to delete or add anywhere, also it you can dynamically add items without knowing the number of items you need in advance. The only disadvantage ii that random access is not possible.

3. Stacks

Stacks are implemented using either arrays or linked lists. They allow only addition and removal of items in the LIFO order. Stacks have many applications including search algorithms, recursion and many others.

4. Queues:

A Queue is a FIFO structure. Queues are also implemented using arrays or linked lists. Queues allow deletion from one end and addition from other.

There are various types of queues like circular queues. Double ended queues, input restricted queues etc.

5. Trees

Trees are used to organize data in a hierarchical manner to facilitate easy deletion and addition.

In short, Data structure is the glue between algorithms and data.

Kannan Balakrishnan is a budding indian writer. He continuously writes on a variety of topics like website design, Computer science, self improvement etc. Now his celebrated book on data structures is available as a kindle edition. This is a simple introduction to data structures with lot of programs in C.

Source: EzineArticles
Was this Helpful ?

Rate this Article

Article Tags:

Data Structures


Data Structures Appear

Windows 8 will change the way you work and play, says Microsoft and we agree. Nearly all of the previous iterations of the Windows OS have been evolutionary but Windows 8 is set to change all that.

By: Sakshi Sharma l Computers & Technology > Mobile Computing l April 03, 2013 lViews: 662

Many antivirus programs available today have various features but it entirely depends on the user to make the best choice from among these different computer virus protection programs online. Before

By: Alex l Computers & Technology > Software l December 28, 2012 lViews: 370

You can add a new color to your entertainment life with iskysoft video converter for mac & iskysoft dvd creator for mac and make your Christmas holidays all the more special. iskysoft video

By: Zaithyn Galter l Computers & Technology > Software l December 23, 2012 lViews: 1070

The choices you make regarding the type of recruiting software you choose to use are important. Being an informed consumer is essential to getting a system or components that complement systems of

By: Maria Warne l Computers & Technology > Software l December 14, 2012 lViews: 306

The Cisco certification has become the most popular IT training in recent days and it offers three different levels of these certifications include as: associate, professional and expert-level.

By: sandidas chakma l Computers & Technology > Certification Tests l December 11, 2012 lViews: 237

Millions of prospective 12th standard students are gearing up their preparations for the Joint Entrance Exam for engineering seats. From 2013, it has been decided by the IITs, CBSE, JEE organizing

By: Sarkariexam l Computers & Technology > Certification Tests l December 07, 2012 lViews: 633

Sunny Ghosh, Director, Wolf Frameworks, once commented "The end of Fashion IT -customers will only pay for value and not technology... With the advent of Web 3.0 or Cloud Computing or platforms..,

By: Camrone Whitel Computers & Technology > Programmingl June 15, 2012 lViews: 165

The other day, I met an individual at Starbucks, an artist amongst other things. He seemed incredibly good at the art of doodling and turning those sketches into art work - the stuff he showed me was

By: Lance Winslowl Computers & Technology > Programmingl June 15, 2012 lViews: 212

Following is a brief outline of the future of WordPress. It talks about the developments, problems and solutions that this segment is facing. WordPress has seen growth like no other in the Content

By: James J. Johnl Computers & Technology > Programmingl June 14, 2012 lViews: 174

Data Warehouse analyses the data, stores them and streamlines the information in the respective systems. This increases the efficiency of the organization and benefits the overall performance of the

By: Sam Mackenziel Computers & Technology > Programmingl June 13, 2012 lViews: 184

One of my favorite topics is artificial intelligence. In fact, I do believe in the future that the CEOs of every major corporation will actually be a supercomputer with artificially intelligent

By: Lance Winslowl Computers & Technology > Programmingl June 13, 2012 lViews: 185

Mobile strategy has evolved as an integrated part of marketing strategy irrespective of the industry vertical. With the smart phones percolating heavily in the Indian market, it is all the more

By: Ponting Smithl Computers & Technology > Programmingl June 12, 2012 lViews: 192

Discuss this Article

comments powered by Disqus