WHAT IS DATA STRUCTURE - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript WHAT IS DATA STRUCTURE - Supercoders | Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Sunday, November 25, 2018

WHAT IS DATA STRUCTURE

What does Data Structure mean? 



 

Data structure refers to methods of organizing units of data within larger data sets. Achieving and maintaining specific data structures help improve data access and value. Data structures also help programmers implement various programming tasks. 

In a general sense, the data structure concept dovetails with that of virtual objects and virtual reality. As data is more elaborately arranged by developers and others, the data becomes more functional, allowing the emergence of a virtual reality. This is a core concept of many technological advances from the last few decades.

Data Object-  

Data Object represents an object having a data.

 

Data Type-

Data type is a way to classify various types of data such as integer, string, etc. which determines the values that can be used with the corresponding type of data, the type of operations that can be performed on the corresponding type of data. There are two data types −
  • Built-in Data Type
  • Derived Data Type

Built-in Data Type-

Those data types for which a language has built-in support are known as Built-in Data types. For example, most of the languages provide the following built-in data types.
  • Integers
  • Boolean (true, false)
  • Floating (Decimal numbers)
  • Character and Strings

Derived Data Type-

Those data types which are implementation independent as they can be implemented in one or the other way are known as derived data types. These data types are normally built by the combination of primary or built-in data types and associated operations on them. For example −
  • List
  • Array
  • Stack
  • Queue

 


 




ELEMENTS OF DATA STRUCTURE

 

 Integer-  

Whole-valued positive or negative number or 0. The integers are generated from the set of counting numbers 1, 2, 3, . . . and the operation of subtraction. When a counting number is subtracted from itself, the result is zero. When a larger number is subtracted from a smaller number, the result is a negative whole number. In this way, every integer can be derived from the counting numbers, resulting in a set of numbers closed under the operation of subtraction (see group theory).

Algorithm-

 systematic procedure that produces—in a finite number of steps—the answer to a question or the solution of a problem. The name derives from the Latin translation, Algoritmi de numero Indorum, of the 9th-century Muslim mathematician al-Khwarizmi’s arithmetic treatise “Al-Khwarizmi Concerning the Hindu Art of Reckoning.” 


How are data structures used?

Data structures handle four main functions for us:
  • Inputting information
  • Processing information
  • Maintaining information
  • Retrieving information
Inputting is largely concerned with how the data is received. What kind of information can be included? Will the new data be added to the beginning, end, or somewhere in the middle of the existing data? Does an existing point of data need to be updated or destroyed?

Processing gets at the way that data is manipulated in the data structure. This can occur concurrently or as a result of other processes that data structures handle. How does existing data that has been stored need to change to accommodate new, updated, or removed data?
 
Maintaining is focused on how the data is organized within the structure. Which relationships need to be maintained between pieces of data? How much memory must the system reserve (allocate) to accommodate the data?

Retrieving is devoted to finding and returning the data that is stored in the structure. How can we access that information again? What steps does the data structure need to take to get the information back to us?
Different types and use cases for data will be better suited to different manners of inputting, processing, storing, and retrieving. This is why we have several data structures to choose from... and the ability to create our own!


Basic types of Data Structures

 

 

As we have discussed above, anything that can store data can be called as a data structure, hence Integer, Float, Boolean, Char etc, all are data structures. They are known as Primitive Data Structures.
Then we also have some complex Data Structures, which are used to store large and connected data. Some example of Abstract Data Structure are :
  • Linked List
  • Tree
  • Graph
  • Stack, Queue etc

Space Complexity

Its the amount of memory space required by the algorithm, during the course of its execution. Space complexity must be taken seriously for multi-user systems and in situations where limited memory is available.
An algorithm generally requires space for following components :
  • Instruction Space: Its the space required to store the executable version of the program. This space is fixed, but varies depending upon the number of lines of code in the program.
  • Data Space: Its the space required to store all the constants and variables(including temporary variables) value.
  • Environment Space: Its the space required to store the environment information needed to resume the suspended function.

Time Complexity

Time Complexity is a way to represent the amount of time required by the program to run till its completion. It's generally a good practice to try to keep the time required minimum, so that our algorithm completes it's execution in the minimum time possible. We will study about Time Complexity in details in later sections.

 

.




 

 



No comments:

Post a Comment

Post Top Ad