Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Basic data structure for computer science student and who are interested in coding ., Schemes and Mind Maps of Computer Science

It is data structure notes data structure is the one of the coding language . It is important for coding so it is a basic explanation of data structure.

Typology: Schemes and Mind Maps

2023/2024

Available from 11/11/2024

dipika-bhosale
dipika-bhosale 🇮🇳

5 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 01
Basic of Data Structures
1. Data structure- Definition:
Data may be organized in many different ways; the logical or mathematical
model of a particular organization of data is called a data structure.
Data structure is the structural representation of logical relationships between
elements of data. In other words a data structure is a way of organizing data
items by considering its relationship to each other.
Data structure mainly specifies the structured organization of data, by
providing accessing methods with correct degree of associativity. Data
structure affects the design of both the structural and functional aspects of a
program.
Algorithm + Data Structure = Program
Data structures are the building blocks of a program; here the selection of a
particular data structure will help the programmer to design more efficient
programs as the complexity and volume of the problems solved by the
computer is steadily increasing day by day.
2. Types of data structures:
Data structures are generally classified into primitive and non-primitive data
structures. Basic data types such as integer, real, character and Boolean are
known as primitive data structures. These data types consist of characters that
cannot be divided, and hence they are also called simple data types.
The non-primitive data structure is the processing of complex numbers, very
few computer are capable of doing arithmetic on complex numbers, linked-
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Basic data structure for computer science student and who are interested in coding . and more Schemes and Mind Maps Computer Science in PDF only on Docsity!

Chapter 01

Basic of Data Structures

1. Data structure- Definition:  Data may be organized in many different ways; the logical or mathematical model of a particular organization of data is called a data structure.  Data structure is the structural representation of logical relationships between elements of data. In other words a data structure is a way of organizing data items by considering its relationship to each other.  Data structure mainly specifies the structured organization of data, by providing accessing methods with correct degree of associativity. Data structure affects the design of both the structural and functional aspects of a program. Algorithm + Data Structure = Program  Data structures are the building blocks of a program; here the selection of a particular data structure will help the programmer to design more efficient programs as the complexity and volume of the problems solved by the computer is steadily increasing day by day. 2. Types of data structures:  Data structures are generally classified into primitive and non-primitive data structures. Basic data types such as integer, real, character and Boolean are known as primitive data structures. These data types consist of characters that cannot be divided, and hence they are also called simple data types.  The non-primitive data structure is the processing of complex numbers, very few computer are capable of doing arithmetic on complex numbers, linked-

list, stacks, queue, trees and graphs are example of non-primitive data structures.  Primitive data structures:Integer: An integer is the basic data types which is commonly used for storing negative as well as non-negative integer numbers. Example 38, - 38  Real Number: The method used to represent real numbers in computer is floating-point notation. In this notation, the real number is represented by a number called a mantissa, times a base raised to an integer power called an exponent. Example 20952 X 10

  • 2 mantissa is 20952 and exponent is - 2.  Character: Some data are storing character or string form. There are different codes available to store data in character form such as BCD, EDCDIC and ASCII.  Boolean: Some data are represent in only two way like true-false, on-off or flag set-flag reset. These kinds of data are considering Boolean type.

Linked List: Consider following fig 1.7 is example of linked lists. Although the terms “pointer” and “link” are usually used synonymously. The term “pointer” when an element in one list points to an element in a different list and to reverse the term “link” for the case when an element in a list points to an element in that same list. Stacks: A stack also called last-in first-out (LIFO) system, is a linear list in which insertions and deletions can be take place only at one end, called the top. This structure is similar in its operation to a stack of dishes on a spring system. Note that new dishes are inserted only at the stack and dishes can be deleted only from the top of the stack.

Queue: A queue also called a first-in first-out (FIFO) system, is a linear list in which deletion can be take place only at one end of the list, the “front” of the list and insertions can take place only at the other end of the list, the “rear” of the list. This structure operates in much the same way as a line of people waiting at the bus stop. Another analogy is which automobiles waiting to pass through an insertion-the first car in the first car through.  Non-linear data structure: A non-linear data structure means they not arranged in sequence. The insertion and deletion of data is therefore not possible in a linear fashion. Trees and graphs are examples of non-linear data structures. Trees: Data frequently contain a hierarchical relationship between various elements. The data structure which reflects this relationship is called a rooted tree graph or, simply, a tree.

3. Data Structure Operations : 4. Algorithms: Complexity, Time and Space complexity:

  1. In the first stage, modeling, we try to represent the problem using an appropriate mathematical model such as a graph, tree etc. At this stage, the solution to the problem is an algorithm expressed very informally.
  2. At the next stage, the algorithm is written in pseudo-language (or formal algorithm) that is, a mixture of any programming language constructs and less formal English statements. The operations to be performed on the various types of data become fixed.
  3. In the final stage we choose an implementation for each abstract data type and

Abstract Data Type: