Basic of tree.
binary Srach treeA binary search tree is a binary tree where each node has a Comparable key the key in any node is larger than the keys in all nodes in that node's left sub tree and smaller than the keys in all nodes in that node's right sub tree
you can also find HEAP, Graph etc
B-Trees are tree data structures used to store data on disk storage. They allow for efficient retrieval of data compared to binary trees when using disk storage due to reduced height. B-Trees group data into nodes that can have multiple children, reducing the height needed compared to binary trees. Keys are inserted by adding to leaf nodes or splitting nodes and promoting middle keys. Deletion involves removing from leaf nodes, borrowing/promoting keys, or joining nodes.
This document provides an overview of graphs and graph algorithms. It begins with an introduction to graphs, including definitions of vertices, edges, directed/undirected graphs, and graph representations using adjacency matrices and lists. It then covers graph traversal algorithms like depth-first search and breadth-first search. Minimum spanning trees and algorithms for finding them like Kruskal's algorithm are also discussed. The document provides examples and pseudocode for the algorithms. It analyzes the time complexity of the graph algorithms. Overall, the document provides a comprehensive introduction to fundamental graph concepts and algorithms.
THREADED BINARY TREE AND BINARY SEARCH TREESiddhi Shrivas
The document discusses threaded binary trees. It begins by defining a regular binary tree. It then explains that in a threaded binary tree, null pointers are replaced by threads (pointers) to other nodes. Threading rules specify that a null left/right pointer is replaced by a pointer to the inorder predecessor/successor. Boolean fields distinguish threads from links. Non-recursive traversals are possible by following threads. Insertion and deletion of nodes may require updating threads. Threaded binary trees allow efficient non-recursive traversals without a stack.
This presentation introduces heaps, which are a type of complete binary tree data structure. It describes the key properties of a heap, including that each node's key is greater than or equal to the keys of its children (the "heap property"). It demonstrates how to add a new node to a heap by placing it in the next available spot and pushing it upward through reheapification until it reaches an acceptable location. It also shows how to remove the top node by moving the last node to the root and pushing it downward through reheapification until it reaches an acceptable location. Finally, it discusses how to implement a heap using a partially filled array to represent the tree structure without needing explicit pointers.
Data structures trees and graphs - Heap Tree.pptxMalligaarjunanN
The document discusses heap data structures, which are specialized binary trees used to implement priority queues. Heaps have the properties that a parent node's value is always greater than or equal to its children's values (for max heaps) or less than or equal (for min heaps). The key operations on heaps are insertion and deletion of elements, which require pushing nodes up or down the tree to maintain the ordering property. Heaps enable efficient implementations of priority queue operations and are used in algorithms like Dijkstra's and Prim's algorithms.
Binary trees are a non-linear data structure where each node has at most two children, used to represent hierarchical relationships, with nodes connected through parent-child links and traversed through preorder, inorder, and postorder methods; they can be represented through arrays or linked lists and support common operations like search, insert, and delete through comparing node values and restructuring child pointers.
In computer science, tree traversal (also known as tree search) is a form of graph traversal and refers to the process of visiting (checking and/or updating) each node in a tree data structure, exactly once. Such traversals are classified by the order in which the nodes are visited. The following algorithms are described for a binary tree, but they may be generalized to other trees as well.
lecture10 date structure types of graph and terminologyKamranAli649587
The document discusses tree traversal techniques and heaps. It begins by explaining tree traversal concepts and the three common traversal techniques: preorder, inorder, and postorder. It then discusses heaps, which are almost complete binary trees where the key of each node is less than or equal to its children's keys. Heaps support efficient insertion and deletion of minimum elements in logarithmic time and are used to implement priority queues. Code implementations of binary trees, tree traversals, heaps, and their operations like insertion and deletion are also provided.
B-Trees are tree data structures used to store data on disk storage. They allow for efficient retrieval of data compared to binary trees when using disk storage due to reduced height. B-Trees group data into nodes that can have multiple children, reducing the height needed compared to binary trees. Keys are inserted by adding to leaf nodes or splitting nodes and promoting middle keys. Deletion involves removing from leaf nodes, borrowing/promoting keys, or joining nodes.
This document provides an overview of graphs and graph algorithms. It begins with an introduction to graphs, including definitions of vertices, edges, directed/undirected graphs, and graph representations using adjacency matrices and lists. It then covers graph traversal algorithms like depth-first search and breadth-first search. Minimum spanning trees and algorithms for finding them like Kruskal's algorithm are also discussed. The document provides examples and pseudocode for the algorithms. It analyzes the time complexity of the graph algorithms. Overall, the document provides a comprehensive introduction to fundamental graph concepts and algorithms.
THREADED BINARY TREE AND BINARY SEARCH TREESiddhi Shrivas
The document discusses threaded binary trees. It begins by defining a regular binary tree. It then explains that in a threaded binary tree, null pointers are replaced by threads (pointers) to other nodes. Threading rules specify that a null left/right pointer is replaced by a pointer to the inorder predecessor/successor. Boolean fields distinguish threads from links. Non-recursive traversals are possible by following threads. Insertion and deletion of nodes may require updating threads. Threaded binary trees allow efficient non-recursive traversals without a stack.
This presentation introduces heaps, which are a type of complete binary tree data structure. It describes the key properties of a heap, including that each node's key is greater than or equal to the keys of its children (the "heap property"). It demonstrates how to add a new node to a heap by placing it in the next available spot and pushing it upward through reheapification until it reaches an acceptable location. It also shows how to remove the top node by moving the last node to the root and pushing it downward through reheapification until it reaches an acceptable location. Finally, it discusses how to implement a heap using a partially filled array to represent the tree structure without needing explicit pointers.
Data structures trees and graphs - Heap Tree.pptxMalligaarjunanN
The document discusses heap data structures, which are specialized binary trees used to implement priority queues. Heaps have the properties that a parent node's value is always greater than or equal to its children's values (for max heaps) or less than or equal (for min heaps). The key operations on heaps are insertion and deletion of elements, which require pushing nodes up or down the tree to maintain the ordering property. Heaps enable efficient implementations of priority queue operations and are used in algorithms like Dijkstra's and Prim's algorithms.
Binary trees are a non-linear data structure where each node has at most two children, used to represent hierarchical relationships, with nodes connected through parent-child links and traversed through preorder, inorder, and postorder methods; they can be represented through arrays or linked lists and support common operations like search, insert, and delete through comparing node values and restructuring child pointers.
In computer science, tree traversal (also known as tree search) is a form of graph traversal and refers to the process of visiting (checking and/or updating) each node in a tree data structure, exactly once. Such traversals are classified by the order in which the nodes are visited. The following algorithms are described for a binary tree, but they may be generalized to other trees as well.
lecture10 date structure types of graph and terminologyKamranAli649587
The document discusses tree traversal techniques and heaps. It begins by explaining tree traversal concepts and the three common traversal techniques: preorder, inorder, and postorder. It then discusses heaps, which are almost complete binary trees where the key of each node is less than or equal to its children's keys. Heaps support efficient insertion and deletion of minimum elements in logarithmic time and are used to implement priority queues. Code implementations of binary trees, tree traversals, heaps, and their operations like insertion and deletion are also provided.
In this playlist
https://youtube.com/playlist?list=PLT...
I'll illustrate algorithms and data structures course, and implement the data structures using java programming language.
the playlist language is arabic.
The Topics:
--------------------
1- Arrays
2- Linear and Binary search
3- Linked List
4- Recursion
5- Algorithm analysis
6- Stack
7- Queue
8- Binary search tree
9- Selection sort
10- Insertion sort
11- Bubble sort
12- merge sort
13- Quick sort
14- Graphs
15- Hash table
16- Binary Heaps
Reference : Object-Oriented Data Structures Using Java - Third Edition by NELL DALE, DANEIEL T.JOYCE and CHIP WEIMS
Slides is owned by College of Computing & Information Technology
King Abdulaziz University, So thanks alot for these great materials
The document discusses trees and binary trees. It defines key tree terminology like nodes, edges, root, leaf, etc. It explains properties of binary trees including full, complete, and binary search trees. It describes techniques for traversing binary trees including preorder, inorder and postorder traversal using recursion and stacks. Searching and insertion operations in binary search trees are also summarized.
This document describes binary trees, including their definition, applications, operations like insertion, deletion and traversal. Binary trees store data in nodes that can have up to two child nodes. Common operations include inserting nodes, searching for values, and traversing the tree in different orders like inorder, preorder and postorder. The document provides code examples for implementing a binary tree class including functions for these operations.
Heapsort uses a heap data structure to sort elements in O(n log n) time. It works by first building a max heap from the input elements and then repeatedly extracting the maximum element and reheapifying to put the next maximum into the root. This produces a sorted output in descending order. The heap property ensures that the root always contains the maximum element, allowing efficient extraction and replacement during the sorting process.
16807097.ppt b tree are a good data structureSadiaSharmin40
The document discusses B-trees, which are tree data structures used to store large datasets on disk. B-trees allow for faster retrieval of data compared to binary search trees when data exceeds main memory. B-trees differ from binary search trees in that internal nodes can have more than two child nodes and store multiple key-value pairs. The document outlines the rules for B-tree structure and provides examples of inserting and removing elements from a B-tree while maintaining its balanced structure.
Heapsort is an O(n log n) sorting algorithm that uses a heap data structure represented as a balanced binary tree. It works by first heapifying an input array in O(n log n) time to create a max heap. It then repeatedly removes the maximum element from the heap, putting it in its sorted position, and sifting the new root element down to reestablish the heap property, until the heap is empty. Overall, heapsort runs in O(n log n) time like other comparison-based sorting algorithms.
The document discusses collaborations between 6 students on the topics of data structures trees and graphs. It provides information on binary trees, binary search trees, tree and graph implementations and common graph algorithms like Dijkstra's algorithm. Examples of trees, graphs and Dijkstra's algorithm are shown.
Heapsort is an O(n log n) sorting algorithm that uses a heap data structure. It works by first turning the input array into a max heap, where the largest element is stored at the root. It then repeatedly removes the root element and replaces it with the last element of the heap, and sifts it down to maintain the heap property. This produces the sorted array from largest to smallest. The heapify and reheap operations each take O(log n) time, and are performed n times, resulting in an overall time complexity of O(n log n).
Heapsort is an O(n log n) sorting algorithm that uses a heap data structure. It works by first turning the input array into a max heap, where the largest element is stored at the root. It then repeatedly removes the root element and replaces it with the last element of the heap, and sifts the new root element down to maintain the heap property. This produces a sorted array from largest to smallest in O(n log n) time.
1. Disk access times are much slower than CPU instruction times, so minimizing disk accesses is important for performance.
2. B-trees address this issue by allowing nodes to have multiple children, reducing the height of the tree and thus the number of required disk accesses to retrieve data.
3. Keys are inserted into B-trees by adding them to leaves and splitting nodes as they become full, and deleted by removing from leaves or borrowing/promoting keys from siblings if needed to maintain minimum occupancy.
This document provides an overview of trees and graphs as data structures. It discusses binary trees, including their implementation and operations like searching. Binary search trees are described, with examples of insertion and searching. Graphs are then introduced, including undirected and directed graphs. Graph representations in Python are shown. Examples of an undirected weighted graph, minimal spanning tree, and shortest paths are provided. Finally, it notes some common graph algorithms.
introduction to binary tree , binary search tree, operations of binary search tree, insertion, deletions, search. 3 cases of deletions, graph tree of binary search tree, complaxcity, notations,algorithms, Data Analysis
Heapsort is a sorting algorithm that uses a heap data structure. It has a worst-case runtime of O(n log n), which makes it generally slower than quicksort but more consistent. A heap is a balanced binary tree where each node's value is greater than or equal to its children's values. To sort an array using heapsort, the array is first converted to a max heap by sifting nodes up. Then the largest element is removed from the root and placed at the end, and the new root is sifted down to re-form the heap. This process repeats until the array is fully sorted in O(n log n) time.
The document describes the bubble sort algorithm. Bubble sort works by repeatedly swapping adjacent elements that are in the wrong order until the list is fully sorted. Each pass of bubble sort bubbles up the largest remaining element to its correct place near the end of the list. It takes multiple passes, with fewer comparisons each time, to fully sort the list from lowest to highest.
This document provides information about different tree data structures including binary trees, binary search trees, AVL trees, red-black trees, splay trees, and B-trees. Binary search trees allow for fast searching and maintain an ordered structure. AVL and red-black trees are self-balancing binary search trees that ensure fast search, insert, and delete times by keeping the tree balanced. B-trees are multiway search trees that allow for efficient storage and retrieval of data in databases and file systems.
Heaps and tries power point this is an educational materialAymericTaylor
This document provides information about heaps and tries data structures. It discusses min heaps, max heaps, and min-max heaps, including their implementations and operations like insertion, deletion, and finding the minimum/maximum elements. It also covers tries data structures and their applications in auto-complete, spell checking, and their tree structure for storing prefixes of words.
In this playlist
https://youtube.com/playlist?list=PLT...
I'll illustrate algorithms and data structures course, and implement the data structures using java programming language.
the playlist language is arabic.
The Topics:
--------------------
1- Arrays
2- Linear and Binary search
3- Linked List
4- Recursion
5- Algorithm analysis
6- Stack
7- Queue
8- Binary search tree
9- Selection sort
10- Insertion sort
11- Bubble sort
12- merge sort
13- Quick sort
14- Graphs
15- Hash table
16- Binary Heaps
Reference : Object-Oriented Data Structures Using Java - Third Edition by NELL DALE, DANEIEL T.JOYCE and CHIP WEIMS
Slides is owned by College of Computing & Information Technology
King Abdulaziz University, So thanks alot for these great materials
The document discusses trees and binary trees. It defines key tree terminology like nodes, edges, root, leaf, etc. It explains properties of binary trees including full, complete, and binary search trees. It describes techniques for traversing binary trees including preorder, inorder and postorder traversal using recursion and stacks. Searching and insertion operations in binary search trees are also summarized.
This document describes binary trees, including their definition, applications, operations like insertion, deletion and traversal. Binary trees store data in nodes that can have up to two child nodes. Common operations include inserting nodes, searching for values, and traversing the tree in different orders like inorder, preorder and postorder. The document provides code examples for implementing a binary tree class including functions for these operations.
Heapsort uses a heap data structure to sort elements in O(n log n) time. It works by first building a max heap from the input elements and then repeatedly extracting the maximum element and reheapifying to put the next maximum into the root. This produces a sorted output in descending order. The heap property ensures that the root always contains the maximum element, allowing efficient extraction and replacement during the sorting process.
16807097.ppt b tree are a good data structureSadiaSharmin40
The document discusses B-trees, which are tree data structures used to store large datasets on disk. B-trees allow for faster retrieval of data compared to binary search trees when data exceeds main memory. B-trees differ from binary search trees in that internal nodes can have more than two child nodes and store multiple key-value pairs. The document outlines the rules for B-tree structure and provides examples of inserting and removing elements from a B-tree while maintaining its balanced structure.
Heapsort is an O(n log n) sorting algorithm that uses a heap data structure represented as a balanced binary tree. It works by first heapifying an input array in O(n log n) time to create a max heap. It then repeatedly removes the maximum element from the heap, putting it in its sorted position, and sifting the new root element down to reestablish the heap property, until the heap is empty. Overall, heapsort runs in O(n log n) time like other comparison-based sorting algorithms.
The document discusses collaborations between 6 students on the topics of data structures trees and graphs. It provides information on binary trees, binary search trees, tree and graph implementations and common graph algorithms like Dijkstra's algorithm. Examples of trees, graphs and Dijkstra's algorithm are shown.
Heapsort is an O(n log n) sorting algorithm that uses a heap data structure. It works by first turning the input array into a max heap, where the largest element is stored at the root. It then repeatedly removes the root element and replaces it with the last element of the heap, and sifts it down to maintain the heap property. This produces the sorted array from largest to smallest. The heapify and reheap operations each take O(log n) time, and are performed n times, resulting in an overall time complexity of O(n log n).
Heapsort is an O(n log n) sorting algorithm that uses a heap data structure. It works by first turning the input array into a max heap, where the largest element is stored at the root. It then repeatedly removes the root element and replaces it with the last element of the heap, and sifts the new root element down to maintain the heap property. This produces a sorted array from largest to smallest in O(n log n) time.
1. Disk access times are much slower than CPU instruction times, so minimizing disk accesses is important for performance.
2. B-trees address this issue by allowing nodes to have multiple children, reducing the height of the tree and thus the number of required disk accesses to retrieve data.
3. Keys are inserted into B-trees by adding them to leaves and splitting nodes as they become full, and deleted by removing from leaves or borrowing/promoting keys from siblings if needed to maintain minimum occupancy.
This document provides an overview of trees and graphs as data structures. It discusses binary trees, including their implementation and operations like searching. Binary search trees are described, with examples of insertion and searching. Graphs are then introduced, including undirected and directed graphs. Graph representations in Python are shown. Examples of an undirected weighted graph, minimal spanning tree, and shortest paths are provided. Finally, it notes some common graph algorithms.
introduction to binary tree , binary search tree, operations of binary search tree, insertion, deletions, search. 3 cases of deletions, graph tree of binary search tree, complaxcity, notations,algorithms, Data Analysis
Heapsort is a sorting algorithm that uses a heap data structure. It has a worst-case runtime of O(n log n), which makes it generally slower than quicksort but more consistent. A heap is a balanced binary tree where each node's value is greater than or equal to its children's values. To sort an array using heapsort, the array is first converted to a max heap by sifting nodes up. Then the largest element is removed from the root and placed at the end, and the new root is sifted down to re-form the heap. This process repeats until the array is fully sorted in O(n log n) time.
The document describes the bubble sort algorithm. Bubble sort works by repeatedly swapping adjacent elements that are in the wrong order until the list is fully sorted. Each pass of bubble sort bubbles up the largest remaining element to its correct place near the end of the list. It takes multiple passes, with fewer comparisons each time, to fully sort the list from lowest to highest.
This document provides information about different tree data structures including binary trees, binary search trees, AVL trees, red-black trees, splay trees, and B-trees. Binary search trees allow for fast searching and maintain an ordered structure. AVL and red-black trees are self-balancing binary search trees that ensure fast search, insert, and delete times by keeping the tree balanced. B-trees are multiway search trees that allow for efficient storage and retrieval of data in databases and file systems.
Heaps and tries power point this is an educational materialAymericTaylor
This document provides information about heaps and tries data structures. It discusses min heaps, max heaps, and min-max heaps, including their implementations and operations like insertion, deletion, and finding the minimum/maximum elements. It also covers tries data structures and their applications in auto-complete, spell checking, and their tree structure for storing prefixes of words.
This document provides an overview of wound healing, its functions, stages, mechanisms, factors affecting it, and complications.
A wound is a break in the integrity of the skin or tissues, which may be associated with disruption of the structure and function.
Healing is the body’s response to injury in an attempt to restore normal structure and functions.
Healing can occur in two ways: Regeneration and Repair
There are 4 phases of wound healing: hemostasis, inflammation, proliferation, and remodeling. This document also describes the mechanism of wound healing. Factors that affect healing include infection, uncontrolled diabetes, poor nutrition, age, anemia, the presence of foreign bodies, etc.
Complications of wound healing like infection, hyperpigmentation of scar, contractures, and keloid formation.
This presentation was provided by Rebecca Benner, Ph.D., of the American Society of Anesthesiologists, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxEduSkills OECD
Iván Bornacelly, Policy Analyst at the OECD Centre for Skills, OECD, presents at the webinar 'Tackling job market gaps with a skills-first approach' on 12 June 2024
Leveraging Generative AI to Drive Nonprofit InnovationTechSoup
In this webinar, participants learned how to utilize Generative AI to streamline operations and elevate member engagement. Amazon Web Service experts provided a customer specific use cases and dived into low/no-code tools that are quick and easy to deploy through Amazon Web Service (AWS.)
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPRAHUL
This Dissertation explores the particular circumstances of Mirzapur, a region located in the
core of India. Mirzapur, with its varied terrains and abundant biodiversity, offers an optimal
environment for investigating the changes in vegetation cover dynamics. Our study utilizes
advanced technologies such as GIS (Geographic Information Systems) and Remote sensing to
analyze the transformations that have taken place over the course of a decade.
The complex relationship between human activities and the environment has been the focus
of extensive research and worry. As the global community grapples with swift urbanization,
population expansion, and economic progress, the effects on natural ecosystems are becoming
more evident. A crucial element of this impact is the alteration of vegetation cover, which plays a
significant role in maintaining the ecological equilibrium of our planet.Land serves as the foundation for all human activities and provides the necessary materials for
these activities. As the most crucial natural resource, its utilization by humans results in different
'Land uses,' which are determined by both human activities and the physical characteristics of the
land.
The utilization of land is impacted by human needs and environmental factors. In countries
like India, rapid population growth and the emphasis on extensive resource exploitation can lead
to significant land degradation, adversely affecting the region's land cover.
Therefore, human intervention has significantly influenced land use patterns over many
centuries, evolving its structure over time and space. In the present era, these changes have
accelerated due to factors such as agriculture and urbanization. Information regarding land use and
cover is essential for various planning and management tasks related to the Earth's surface,
providing crucial environmental data for scientific, resource management, policy purposes, and
diverse human activities.
Accurate understanding of land use and cover is imperative for the development planning
of any area. Consequently, a wide range of professionals, including earth system scientists, land
and water managers, and urban planners, are interested in obtaining data on land use and cover
changes, conversion trends, and other related patterns. The spatial dimensions of land use and
cover support policymakers and scientists in making well-informed decisions, as alterations in
these patterns indicate shifts in economic and social conditions. Monitoring such changes with the
help of Advanced technologies like Remote Sensing and Geographic Information Systems is
crucial for coordinated efforts across different administrative levels. Advanced technologies like
Remote Sensing and Geographic Information Systems
9
Changes in vegetation cover refer to variations in the distribution, composition, and overall
structure of plant communities across different temporal and spatial scales. These changes can
occur natural.
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
This presentation was provided by Racquel Jemison, Ph.D., Christina MacLaughlin, Ph.D., and Paulomi Majumder. Ph.D., all of the American Chemical Society, for the second session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session Two: 'Expanding Pathways to Publishing Careers,' was held June 13, 2024.
4. Root: node without parent (A)
Siblings: nodes share the same
parent
Internal node: node with at least
one child.
External node (leaf ): node
without children
Ancestors of a node: parent,
grandparent, grand-grandparent,
etc.
Descendant of a node: child,
grandchild, grand-grandchild, etc.
Depth of a node: number of
ancestors
Height of a tree: maximum depth
of any node
Degree of a node: the number of
its children
Degree of a tree: the maximum
number of its node.
7. Short form of BST is Binary Search TREE
A binary search tree is a binary tree where each node has
a Comparable key the key in any node is larger than the
keys in all nodes in that node's left sub tree and smaller
than the keys in all nodes in that node's right sub tree.
8
6 28
1 5 3525
A COMPLETE BINARY TREE
What is a binary search tree?
10. INSERT
Insert 11
1.Start at root.
2.Move to 10 on right, because 11>6
3.Move to 19 on right, because
11>10.
6
2 10
0 5 19
4
11. INSERT
Insert 11
1.Start at root.
2.Move to 10 on right, because 11>6
3.Move to 19 on right, because
11>10.
4.Insert 11 to the left of 19, because
11<19 and right of 19 is NULL.
6
2 10
0 5 19
4
12. INSERT
Insert 11
1.Start at root.
2.Move to 10 on right, because 11>6
3.Move to 19 on right, because
11>10.
4.Insert 11 to the left of 19, because
11<19 and right of 19 is NULL.
6
2 10
0 5 19
4 11
13. INSERT
Insert 11
1.Start at root.
2.Move to 10 on right, because 11>6
3.Move to 19 on right, because
11>10.
4.Insert 11 to the left of 19, because
11<19 and right of 19 is NULL.
6
2 10
0 5 19
4 11
11 INSERTED IN THE TREE
16. DELETE
Delete 5
1.Start at root and search 5.
2.Move to 2 on left, because 5<6.
3.Move to 5 on right.
6
2 10
0 5 19
4 11
17. DELETE
Delete 5
1.Start at root and search 5.
2.Move to 2 on left, because 5<6.
3.Move to 5 on right.
4.Delete 5 from the right of 2.
6
2 10
0 19
4 11
18. DELETE
Delete 5
1.Start at root and search 5.
2.Move to 2 on left, because 5<6.
3.Move to 5 on right.
4.Delete 5 from the right of 2.
5.Now take 4 and set at the right of 2.
6
2 10
0 4 19
11
19. DELETE
Delete 5
1.Start at root and search 5.
2.Move to 2 on left, because 5<6.
3.Move to 5 on right.
4.Delete 5 from the right of 2.
5.Now take 4 and set at the right of 2.
6
2 10
0 4 19
11
5 DELETED FROM THE TREE
20. TRAVERSING
Preorder:
1.Visit the Root
2.Traverse the Left subtree
3.Traverse The Right subtree
7>1>0>3>2>5>4>6>9>8>10
In order:
1.Traverse the Left subtree.
2.Visit the Root.
3.Traverse the Right subtree.
Post Order :
1.Traverse the Left subtree
2. Traverse the Right subtree.
3.Visit the Root.
7
1 9
0 3
8 10
52
64
7,1,0,3,2,5,4,6,9,8,10
21. Heaps
A heap is a certain
kind of complete
binary tree.
Each node in a heap
contains a key that
can be compared to
other nodes' keys.
19
4222127
23
45
35
22. Types of Heaps:
• There are two types of heaps
1. Max Heap
2. Min Heap
23. 23
Max Heap
The “MAX heap property"
requires that each
node's key is >= the
keys of its children
24. 24
Min Heap
The “Min heap property"
requires that each
node's key is <= the
keys of its children
25. Adding a Node to a Heap
Put the new node in the
next available spot.
Push the new node
upward, swapping with its
parent until the new node
reaches an acceptable
location.
19
4222127
23
45
35
42
26. Adding a Node to a Heap
Put the new node in the
next available spot.
Push the new node
upward, swapping with its
parent until the new node
reaches an acceptable
location.
19
4222142
23
45
35
27
27. Adding a Node to a Heap
Put the new node in the
next available spot.
Push the new node
upward, swapping with its
parent until the new node
reaches an acceptable
location.
19
4222135
23
45
42
27
28. Adding a Node to a Heap
The parent has a key that
is >= new node, or
The node reaches the root.
The process of pushing the
new node upward is
called
reheapification
upward.
19
4222135
23
45
42
27
29. Removing the Top of a Heap
Move the last node onto
the root.
19
4222135
23
45
42
27
30. Removing the Top of a Heap
Move the last node onto
the root.
19
4222135
23
27
42
31. Removing the Top of a Heap
Move the last node onto
the root.
Push the out-of-place node
downward, swapping with
its larger child until the
new node reaches an
acceptable location.
19
4222135
23
27
42
32. Removing the Top of a Heap
Move the last node onto
the root.
Push the out-of-place node
downward, swapping with
its larger child until the
new node reaches an
acceptable location.
19
4222135
23
42
27
33. Removing the Top of a Heap
Move the last node onto
the root.
Push the out-of-place node
downward, swapping with
its larger child until the
new node reaches an
acceptable location.
19
4222127
23
42
35
34. Removing the Top of a Heap
The children all have keys
<= the out-of-place node,
or
The node reaches the leaf.
The process of pushing the
new node downward is
called
reheapification
downward. 19
4222127
23
42
35
35. Implementing a Heap
We will store the data
from the nodes in a
partially-filled array.
An array of data
2127
23
42
35
36. Implementing a Heap
• Data from the root goes in
the first location of
the array.
An array of data
2127
23
42
35
42
37. Implementing a Heap
• Data from the next row
goes in the next two array
locations.
An array of data
2127
23
42
35
42 35 23
38. Implementing a Heap
• Data from the next row
goes in the next two array
locations.
An array of data
2127
23
42
35
42 35 23 27 21
39. Implementing a Heap
• Data from the next row
goes in the next two array
locations.
An array of data
2127
23
42
35
42 35 23 27 21
We don't care what's in
this part of the array.
40. Graph
A graph that consists of a set of nodes (vertices) and a set of edges that relate
the nodes to each other.
41. Degree: The number of edge of a node is called degree of that node.
Connected Graph: A graph said to be connected if and only if there is a
simple path between two nodes.
42. Complete Graph: A graph is said to be
complete if every node is adjacent to every
other node.
Tree Graph: A connected graph without
any cycle is called a tree graph or free
tree or only tree.
43. Cycle: Cycle is a closed simple path with
length three or more.
Here,ACDA is a cycle in this Graph.
Labeled Graph: A graph is said to be
labeled if its edegs are assigned data.
44. Weighted Graph: A graph is said to be weighted if each edge is assigned a non-
negative value called the weight of length.
45. GRAPH
MULTIPLE EDGE / DISTINCT EDGE: If two edge connected the same end points.
LOOP : An edge is called a loop if it has same identical end points.
46. DIRECTED GRAPG
DIRECTED GRAPH : In a graph the vertices that are connected together , where all the edges are
directed from one two another vertices .
From this graph v1 is initial points and v2 is terminal points.
v1 is a predecessor of v2 and v2 is successer of v1 .
DEGREE : Directed graph has two types degree .
• Indegree
• Outdegree
47. DIRECTED GRAPH
SOURCE : A node is called as a source if it has a positive out degree and 0 indegree .
SINK : A node is called as a sink if it has a positive indegree and 0 out degree .
48. ADJACENT NODE : Two nodes are adjacent if they connected via an edge .
ADJANCENT MATRIX : Connectivity between two nodes can be tested quickly.
ADJACENT
49. ADJACENT
ADJACENT LIST : Adjacent node can be represented also adjacent list.
• 0 -> 1
• 1 -> 2 , 3
• 2 ->
• 3 -> 0 , 2