SlideShare a Scribd company logo
Data Structure & Algorithms | Computer Science
Data Structure
It is the logical way to store and to organize the data in a system. A abstract data type
or ADT is a scientific model of data structure. It depicts a holder which holds a limited
number of objects where the items might be related through a given binary relationship.
There are two types of data structure.
Data Structures in C/ C++
There are five types of data structures inn C/ C++
1. Stack – Last in First out
2. Queue – First in First out
3. Heap – Complete binary trees which are not sorted
4. Hash Tables – Implementing key array data structure
5. Graph – Method of representing connection between
different places.
Difference between Open Hashing & Closed Hashing
• Linear probing double or irregular hashing are good if the keys are kept as the entries
in the hash table itself. This is called as closed hashing.
• In open hashing, entries in hash table are the pointers to the linked list head elements.
Collision determination turns out to be simple with separate chaining: while inserting a
key in the linked list if it is there.
Data Structure & Algorithms | Computer Science
Linear Hashing
• It allows the hash file to expand and shrink its number of buckets dynamically
without any directory.
• It starts with M buckets numbered 0 to M-1 and use the mod hash function
H(K) = K mod M
As the initial hash function called hi.
Binary SearchTree
In a BST, every node stores some data including unique key value, and
maybe some related data. A double tree is a BST iff, for each node n in
the tree:
• All keys in n's left subtree are not as much as the key in n, and
• All keys in n's right subtree are more noteworthy than the key in n.
Note: if duplicate keys are permitted, then nodes with values that are
equivalent to the key in node n can be either in n's left subtree or in its
right subtree.
Notes: we will expect that duplicates are not permitted.
Binary SearchTree Algorithm
def search_recursively(key, node):
2 if node is None or node.key == key:
3 return node
4 elif key < node.key:
5 return search_recursively(key,
node.left)
6 else: # key > node.key
7 return search_recursively(key,
node.right)
Example of binary search tree is
build_binary_tree([1, 2, 3, 4, 5]) yields the tree (1 (2 (3 (4 (5))))).
Linked List
Every element in linked list data structure is represented by two nodes. One is
main node and other contains reference to previous node. These are of three
types:
• Singly linked list
• Doubly linked list
• Circular linked list
Applications of Linked List
• These are used in implementation of stack and queue or implementing graphs.
• Hash tables can also be implemented with the help of linked lists.
• Polynomial can be shown in the form of array or in linked list by saving the coefficient
as well as exponent of each term.
• These are also used in dynamic memory allocation.
Hey Friend,
This was just a summary on Data Structure &
Algorithms. For more detailed information on this topic,
please type the link given below or copy it from the
description of this PPT and open it in a new browser
window.
www.transtutors.com/homework-help/computer-science/data-structure-and-algorithms.aspx

More Related Content

PPTX
Data Structures
PPT
Chapter 8: tree data structure
PPTX
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
PPTX
Introduction to data structure ppt
PDF
Data structure
PPTX
Data structure &amp; algorithms introduction
PDF
Data structures (introduction)
PDF
Ii pu cs practical viva voce questions
Data Structures
Chapter 8: tree data structure
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Introduction to data structure ppt
Data structure
Data structure &amp; algorithms introduction
Data structures (introduction)
Ii pu cs practical viva voce questions

What's hot (20)

PDF
Introduction of data structures and algorithms
PPT
Introductiont To Aray,Tree,Stack, Queue
PPTX
Introduction of Data Structure
PDF
Data structure using c++
PDF
Data Structures
PPTX
Data structure & its types
PPT
Introduction to data structure
PDF
Introduction to data structure
PPTX
DATA STRUCTURE
PPTX
Data Structure
PDF
Data Structures Notes 2021
PPT
Lecture 1 data structures and algorithms
PPTX
Data structure
PPTX
Introduction To Data Structures.
PDF
Data structures
PPT
Data structures
PPTX
Data structure and its types.
PDF
Data structures Basics
PPT
Data structures using c
PPTX
Mca ii dfs u-1 introduction to data structure
Introduction of data structures and algorithms
Introductiont To Aray,Tree,Stack, Queue
Introduction of Data Structure
Data structure using c++
Data Structures
Data structure & its types
Introduction to data structure
Introduction to data structure
DATA STRUCTURE
Data Structure
Data Structures Notes 2021
Lecture 1 data structures and algorithms
Data structure
Introduction To Data Structures.
Data structures
Data structures
Data structure and its types.
Data structures Basics
Data structures using c
Mca ii dfs u-1 introduction to data structure
Ad

Similar to Data Structure & Algorithms | Computer Science (20)

PPT
02 linked list_20160217_jintaekseo
PPT
linked_lists.ppt linked_lists linked_lists
PPTX
Data Structure and Algorithms by Sabeen Memon03.pptx
PPTX
introduction to trees,graphs,hashing
PPT
Searching algorithms
PPTX
Advanced Data Structures and Algorithms.pptx
PPTX
Linked list in Data Structure and Algorithm
PDF
Data structure
PPTX
Index Structures.pptx
PPT
Data Structures 8
PPTX
link list.pptx complete notes detailed ans
PDF
Linked list (introduction) 1
PPTX
Relational Database Management System
PPTX
data science
PPTX
Datastucture-Unit 4-Linked List Presentation.pptx
PDF
Introduction to Data Structure
PDF
Indexing techniques
PPTX
unit 1.pptx
PPTX
Hashing Technique In Data Structures
PPTX
lecture 2 notes indexing in application of database systems.pptx
02 linked list_20160217_jintaekseo
linked_lists.ppt linked_lists linked_lists
Data Structure and Algorithms by Sabeen Memon03.pptx
introduction to trees,graphs,hashing
Searching algorithms
Advanced Data Structures and Algorithms.pptx
Linked list in Data Structure and Algorithm
Data structure
Index Structures.pptx
Data Structures 8
link list.pptx complete notes detailed ans
Linked list (introduction) 1
Relational Database Management System
data science
Datastucture-Unit 4-Linked List Presentation.pptx
Introduction to Data Structure
Indexing techniques
unit 1.pptx
Hashing Technique In Data Structures
lecture 2 notes indexing in application of database systems.pptx
Ad

More from Transweb Global Inc (20)

PPTX
Resultant of Coplanar Parallel Forces | Mechanical Engineering
PPTX
The Centroidal Axis | Mechanical Engineering
PPTX
System Of Coplanar Forces | Mechanical Engineering
PPTX
Resultant of Two Unlike and Unequal Parallel Forces | Mechanical Engineering
PPTX
SFD Load Diagram Examples | Mechanical Engineering
PPTX
Principle Of Transmissibility | Mechanical Engineering
PPTX
Law Of Polygon | Mechanical Engineering
PPTX
Similarities between Leadership and Management | Management
PPTX
Ranked Positional Weight Method | Management
PPTX
Business Intelligence And Business Analytics | Management
PPTX
ABC Cost Hierarchy | Management
PPTX
Speed To Market | Management
PPTX
Managerial Hubris | Finance
PPTX
Conductance | Electrical Engineering
PPTX
Advantages and Disadvantages of Digital Electronics | Electrical Engineering
PPTX
Stabilization Of Operating Point | Electrical Engineering
PPTX
Offer Curves | Economics
PPTX
Fixed Exchange Rate | Economics
PPTX
Computer Architecture | Computer Science
PPTX
Compilers Computer Program | Computer Science
Resultant of Coplanar Parallel Forces | Mechanical Engineering
The Centroidal Axis | Mechanical Engineering
System Of Coplanar Forces | Mechanical Engineering
Resultant of Two Unlike and Unequal Parallel Forces | Mechanical Engineering
SFD Load Diagram Examples | Mechanical Engineering
Principle Of Transmissibility | Mechanical Engineering
Law Of Polygon | Mechanical Engineering
Similarities between Leadership and Management | Management
Ranked Positional Weight Method | Management
Business Intelligence And Business Analytics | Management
ABC Cost Hierarchy | Management
Speed To Market | Management
Managerial Hubris | Finance
Conductance | Electrical Engineering
Advantages and Disadvantages of Digital Electronics | Electrical Engineering
Stabilization Of Operating Point | Electrical Engineering
Offer Curves | Economics
Fixed Exchange Rate | Economics
Computer Architecture | Computer Science
Compilers Computer Program | Computer Science

Recently uploaded (20)

PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
From loneliness to social connection charting
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Open folder Downloads.pdf yes yes ges yes
PPTX
How to Manage Starshipit in Odoo 18 - Odoo Slides
PDF
Pre independence Education in Inndia.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Pharma ospi slides which help in ospi learning
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Structure & Organelles in detailed.
Open Quiz Monsoon Mind Game Prelims.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
From loneliness to social connection charting
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
O5-L3 Freight Transport Ops (International) V1.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Revamp in MTO Odoo 18 Inventory - Odoo Slides
102 student loan defaulters named and shamed – Is someone you know on the list?
Open folder Downloads.pdf yes yes ges yes
How to Manage Starshipit in Odoo 18 - Odoo Slides
Pre independence Education in Inndia.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Pharma ospi slides which help in ospi learning
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Structure & Organelles in detailed.

Data Structure & Algorithms | Computer Science

  • 2. Data Structure It is the logical way to store and to organize the data in a system. A abstract data type or ADT is a scientific model of data structure. It depicts a holder which holds a limited number of objects where the items might be related through a given binary relationship. There are two types of data structure.
  • 3. Data Structures in C/ C++ There are five types of data structures inn C/ C++ 1. Stack – Last in First out 2. Queue – First in First out 3. Heap – Complete binary trees which are not sorted 4. Hash Tables – Implementing key array data structure 5. Graph – Method of representing connection between different places.
  • 4. Difference between Open Hashing & Closed Hashing • Linear probing double or irregular hashing are good if the keys are kept as the entries in the hash table itself. This is called as closed hashing. • In open hashing, entries in hash table are the pointers to the linked list head elements. Collision determination turns out to be simple with separate chaining: while inserting a key in the linked list if it is there.
  • 6. Linear Hashing • It allows the hash file to expand and shrink its number of buckets dynamically without any directory. • It starts with M buckets numbered 0 to M-1 and use the mod hash function H(K) = K mod M As the initial hash function called hi.
  • 7. Binary SearchTree In a BST, every node stores some data including unique key value, and maybe some related data. A double tree is a BST iff, for each node n in the tree: • All keys in n's left subtree are not as much as the key in n, and • All keys in n's right subtree are more noteworthy than the key in n. Note: if duplicate keys are permitted, then nodes with values that are equivalent to the key in node n can be either in n's left subtree or in its right subtree. Notes: we will expect that duplicates are not permitted.
  • 8. Binary SearchTree Algorithm def search_recursively(key, node): 2 if node is None or node.key == key: 3 return node 4 elif key < node.key: 5 return search_recursively(key, node.left) 6 else: # key > node.key 7 return search_recursively(key, node.right) Example of binary search tree is build_binary_tree([1, 2, 3, 4, 5]) yields the tree (1 (2 (3 (4 (5))))).
  • 9. Linked List Every element in linked list data structure is represented by two nodes. One is main node and other contains reference to previous node. These are of three types: • Singly linked list • Doubly linked list • Circular linked list
  • 10. Applications of Linked List • These are used in implementation of stack and queue or implementing graphs. • Hash tables can also be implemented with the help of linked lists. • Polynomial can be shown in the form of array or in linked list by saving the coefficient as well as exponent of each term. • These are also used in dynamic memory allocation.
  • 11. Hey Friend, This was just a summary on Data Structure & Algorithms. For more detailed information on this topic, please type the link given below or copy it from the description of this PPT and open it in a new browser window. www.transtutors.com/homework-help/computer-science/data-structure-and-algorithms.aspx