Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Data structures and algorithm

Rating
-
Sold
-
Pages
27
Uploaded on
19-12-2024
Written in
2024/2025

This material provides a deep knowledge about the basics of data structures. This helps even freshers and employees to crack their interviews

Institution
Course

Content preview

UNIT I ABSTRACT DATA TYPES

Abstract Data Types (ADTs) – ADTs and classes – introduction to OOP – classes in Python –
inheritance – namespaces – shallow and deep copying- Introduction to analysis of algorithms –
asymptotic notations – divide & conquer – recursion –analyzing recursive algorithms.

Prerequisite:
Data:
A collection of facts, concepts, figures, observations, occurrences or instructions in a formalized
manner.
Information:
The meaning that is currently assigned to data by means of the conventions applied to those
data(i.e. processed data)
Record:
Collection of related fields.
Data type:
Set of elements that share common set of properties used to solve a program.
Data Structures:
Data Structure is the way of organizing, storing, and retrieving data and their relationship with
each other.
Characteristics of data structures:
1. It depicts the logical representation of data in computer memory.
2. It represents the logical relationship between the various data elements.
3. It helps in efficient manipulation of stored data elements.
4. It allows the programs to process the data in an efficient manner.
Operations on Data Structures:
1.Traversal
2.Search
3.Insertion
4.Deletion

,CLASSIFICATION OFDATASTRUCTURES




Primary Data Structures/Primitive Data Structures:
Primitive data structure includes all the fundamental data structures that can be directly
manipulated by machine-level instructions. Some of the common primitive data structures
include integer, character, real, Boolean etc.
Secondary Data Structures/Non Primitive Data Structures:
Non primitive data structures, refer to all those data structures that are derived from one
or more primitive data structures. The objective of creating non-primitive data structures is to
form sets of homogeneous or heterogeneous data elements.

Linear Data Structures:
Linear data structures are data structures in which, all the data elements are arranged in
linear or sequential fashion. Examples of data structures include arrays, stacks, queues, linked
lists, etc.

Non Linear Structures:
In non-linear data structures, there is definite order or sequence in which data elements
are arranged. For instance, a non-linear data structures could arrange data elements in a
hierarchical fashion. Examples of non-linear data structures are trees and graphs.

Application of data structures:
Data structures are widely applied in the following areas:
Compiler design
Operating system
Statistical analysis package
DBMS
Numerical analysis
Simulation

, Artificial intelligenceand Graphics
ABSTRACT DATA TYPES (ADTS):
 An abstract data type (ADT) is a set of operations.
 Abstract data types are mathematical abstractions;
 In an ADT’s definition, there is no mention of how the set of operations is implemented.
 Objects such as lists, sets and graphs, along with their operations, can be viewed as
abstract data types, just as integers, reals and Booleans are data types. Integers, reals and
Booleans have operations associated with them, and so do abstract data types.
 For the set ADT, we might have such operations as union, intersection, size and
complement.
 The basic idea is that the implementation of these operations is written once in the
program, and any other part of the program that needs to perform an operation on the
ADT can do so by calling the appropriate function.
 If for some reason the implementation details need to be changed, it should be easy to do
so by merely changing the routines that perform the ADT operations.
 This change would be completely transparent to the rest of the program.
Advantages/Benefits of ADT:
1.Modularity
2.Reuse
3.code is easier to understand
4.Implementation of ADTs can be changed without requiring changes to the program that uses
the ADTs.
CLASSES

A class is a user-defined blueprint or prototype from which objects are created. The class came
into existence when it instantiated. On the other hand, the object is the instance of a class.

The process of creating an object can be called instantiation. Class instances can also have
methods (defined by their class) for modifying their state.

Creating classes in Python

In Python, a class can be created by using the keyword class, followed by the class name. The
syntax to create a class is given below.

Syntax: Class Definition

class ClassName:
# Statement
Some points on Python class:
 Classes are created by keyword class.
 Attributes are the variables that belong to a class.

Written for

Institution
Course

Document information

Uploaded on
December 19, 2024
Number of pages
27
Written in
2024/2025
Type
Class notes
Professor(s)
K. sowndharya
Contains
All classes

Subjects

$7.59
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
belsiirudayaraj

Get to know the seller

Seller avatar
belsiirudayaraj Anjalai ammal mahalingam engineering college
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions