Data structure


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Data structure

  1. 1.
  2. 2. ● A data type is a collection of values and a set of operations that act on those values● A data type refers to the type of values that variables in a programming language hold.● Whether our program is dealing with predefined or user defined data types. The following two aspects must be considered. ○ Set of Values ○ Set of operations● for e.g. int data type consists of values {minint, ….., -2, -1, 0, 1, 2, ……., maxint}
  3. 3. ● Primitive Data Type ○ A data type that is predefined. ○ Also known as built in data type. ○ It may be different for different programming languages. ○ Inbuilt data type of ‘C’ – int, real(float,double), char● Abstract Data Type ○ It is a data type that is organized in such a way that the specification of the values and the specification of the operation on those values are ■ Separated from the representation of the values ■ Implementation of the operations
  4. 4. ● Boolean (True/False values)● char (char values)● Float (real number values)● Double ( a larger size of type float)● int (fixed-precision values)● String (for storing of chars)
  5. 5. ● “Data Structure is a branch of computer science that unleashes the knowledge of how the data should be organized, how the flow of data should be controlled and how a data structure should be designed and implemented to reduce the complexity and increase the efficiency of the algorithm”
  6. 6. ● boolean ○ Also known as logical data type ○ Having two values TRUE and FALSE● char ○ It is used to store character, letters, symbols or digits ○ Different codes available to store data in character form such as BCD, EBCDIC, ASCII
  7. 7. ● float ○ It is used to represent real numbers in computers is floating-point notation.● int ○ Basic data type which is commonly used for storing negative as well as non-negative integer numbers. ○ Different codes available to store data in character form such as BCD, EBCDIC, ASCII
  8. 8. ● List is an abstract data type● A list is a collection of elements which can be ordered or unordered.● The primitives operations on a list may include ○ Adding New Elements ○ Deleting Elements ○ Determining number of elements in the list ○ Applying a particular process to each element in the list● We are least concerned how the list is represented and operations on it are implemented.
  9. 9. ● Linear Data Structure● Non-Linear Data Structure
  10. 10. ● Linear Data Structure ○ The elements of linear structure form a sequence ○ Example : ■ Arrays ■ Linked lists ■ Stacks ■ Queues
  11. 11. ● Non-Linear Data Structure ○ The elements of non-linear structure do not form form a sequence ○ Example : ■ Trees ■ Graphs