×
☰ Menu

Introduction to the Data structure

 

In computer science, a data structure is a way to store and organize data in a computer so that it can be used efficiently. Different kinds of data structures work best for different kinds of applications, and some are very specialized for certain tasks. For example, B-trees are great for implementing databases, while hash tables are usually used to look up identifiers in compiler implementations.

Almost every program or software system uses data structures. Specific data structures are essential parts of many efficient algorithms and make it possible to manage huge amounts of data, such as in large databases and internet indexing services. Some formal design methods and programming languages focus on data structures instead of algorithms as the most important way to organize software.

Basic Principle of Data structures

Most data structures are based on the fact that a computer can get and store data anywhere in its memory. This is done by using an address, which is a string of bits that can be stored in memory and changed by the program. So, record and array data structures are based on using arithmetic operations to figure out the addresses of data items, while linked data structures are based on storing the addresses of data items within the structure itself. Both rules are used in a variety of data structures.

   Assembly languages and some low-level languages like BCPL don't usually have support for data structures. On the other hand, many high-level programming languages have a special syntax or other built-in support for certain data structures, such as vectors (one-dimensional arrays) in the C programming language, multi-dimensional arrays in Pascal, linked lists in Common Lisp, and hash tables in Perl. Many languages also have basic features, like references and the definition record data type, that can be used to build structures of any complexity. Most programming languages have some kind of library that lets different programs use the same implementations of data structures. The most common data structures are usually built into the standard libraries of modern programming languages. Examples are the C++ Standard Template Library, the Java Collections Framework, and Microsoft's .NET Framework.