This chapter discusses different data structures and their applications. It begins with classifying data structures as primitive and non-primitive. Common linear data structures like stacks, queues, and linked lists are described. Stacks follow LIFO while queues follow FIFO. Linked lists use nodes connected by pointers. The chapter provides examples of implementing operations for these structures.
Data structure is an arrangement of data in computer's memory. It makes the data quickly available to the processor for required operations.It is a software artifact which allows data to be stored, organized and accessed.
Data Structures and algoithms Unit - 1.pptxmexiuro901
it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,
Data structure is an arrangement of data in computer's memory. It makes the data quickly available to the processor for required operations.It is a software artifact which allows data to be stored, organized and accessed.
Data Structures and algoithms Unit - 1.pptxmexiuro901
it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,it is about data structures and algorithms. this ppt has all data structures like linkedlist, trees, graph,
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
2. Outline
Classification of Data Structure
Stacks
Linked lists
Queues
Trees
Graphs
10/20/2023 2
•COSC 709: Natural Language Processing
3. DS&A and Program
As we know that an algorithm is a step by step procedure to solve a particular function or
problem
Program = algorithm + Data Structure
Data Structure = Operation + Organized Data
Storage structure is the representation of particular DS in the memory of the computer.
That means, algorithm is a set of instruction written to carry out certain tasks & the data
structure is the way of organizing the data with their logical relationship retained.
To develop a program of an algorithm, we should select an appropriate data structure for that
algorithm.
To convert a formal algorithm to a program we use step wise Refinement Techniques
(mathematical model, pseudo code, DS, C/C++ program etc.).
10/20/2023 Data Structures and Algorithms 3
4. Classification of Data Structure
Data structure
Primitive DS Non-Primitive DS
Integer Float Character Pointer
Float
Integer Float
6. Primitive data structure
Primitive data structure is a fundamental type of data structure
that stores the data of only one type.
The fundamental data types can hold a single type of value
example integer, float, character, pointer type of value.
Non-primitive
In the case of non-primitive data structure, it is categorized into
two parts such as linear data structure and non-linear data
structure.
Linear data structure is a sequential type of data structure we
have different linear data structures holding the sequential
values such as Array, Linked list, Stack, Queue.
10/20/2023 6
Data Structures and Algorithms
7. Static Data Structure vs Dynamic Data Structure
10/20/2023 7
Data Structures and Algorithms
9. Array
Why array????
An array is a linear data structure and it is a collection of items stored at contiguous memory
locations.
The idea is to store multiple items of the same type together in one place. It allows the processing
of a large amount of data in a relatively short period. The first element of the array is indexed by 0.
It cannot contain the elements of different types like integer with character. The commonly used
operation in an array is insertion, deletion, traversing, searching.
For example:
int a[6] = {1,2,3,4,5,6};
10/20/2023 9
Data Structures and Algorithms
11. Characteristics of an Array:
An array has various characteristics which are as follows:
Arrays use an index-based data structure which helps to
identify each of the elements in an array easily using the
index.
If a user wants to store multiple values of the same data type,
then the array can be utilized efficiently.
An array can also handle complex data structures by storing
data in a two-dimensional array.
An array is also used to implement other data structures like
Stacks, Queues, Heaps, Hash tables, etc.
The search process in an array can be done very easily.
10/20/2023 11
•Data Structures and Algorithms
12. Stack Data structure
What is a Stack? Example:- ordered list of Book, CD
A Stack is a linear data structure that follows the LIFO (Last-
In-First-Out) principle.
It is a data structure that follows some order to insert and delete
the elements, and that order can be LIFO or FILO.
In other words, a stack can be defined as a container in which
insertion and deletion can be done from the one end known as
the top of the stack.
Both insertion and deletion only possible at top of the stack.
10/20/2023 12
Data Structures and Algorithms
13. Standard Stack Operations
The following are some common operations implemented on the stack:
push(): When we insert an element in a stack then the operation is known as a
push. If the stack is full then the overflow condition occurs.
pop(): When we delete an element from the stack, the operation is known as a
pop. If the stack is empty means that no element exists in the stack, this state is
known as an underflow state.
peek(): It returns the element at the given position.
isEmpty(): It determines whether the stack is empty or not.
isFull(): It determines whether the stack is full or not.'
10/20/2023 13
Data Structures and Algorithms
14. Working of Stack
Stack works on the LIFO pattern. As we can observe in the below figure there are five memory blocks in the
stack; therefore, the size of the stack is 5.
Suppose we want to store the elements in a stack and let's assume that stack is empty. We have taken the stack
of size 5 as shown below in which we are pushing the elements one by one until the stack becomes full.
In the above case, the value 1 is entered first, so it will be removed only after the deletion of all the other
elements.
10/20/2023 14
Data Structures and Algorithms
15. Logical PUSH operation
10/20/2023 15
Data Structures and Algorithms
The steps involved in the PUSH operation is given below:
Before inserting an element in a stack, we check whether the stack is full.
If we try to insert the element in a stack, and the stack is full, then the overflow condition occurs.
When we initialize a stack, we set the value of top as -1 to check that the stack is empty.
When the new element is pushed in a stack, first, the value of the top gets incremented, i.e., top=top+1, and the element
will be placed at the new position of the top.
The elements will be inserted until we reach the max size of the stack.
16. POP operation
The steps involved in the POP operation is given below:
Before deleting the element from the stack, we check whether the stack is empty.
If we try to delete the element from the empty stack, then the underflow condition
occurs.
If the stack is not empty, we first access the element which is pointed by the top.
Once the pop operation is performed, the top is decremented by 1.
10/20/2023 16
Data Structures and Algorithms
17. Inserting on stack(push)
void push()
{
int val
if (top == n - 1)
cout << "Stack Overflow" << endl;
else
{
if (top == - 1)
top= 0;
cout << "Insert an element to push : " << endl;
cin>>val;
top++;
stack[top] = val;
}
}
10/20/2023 17
Data Structures and Algorithms
18. Deleting from stack(pop)
void pop()
{
int item;
if (top == - 1 )
{
cout << "Stack Underflow ";
else
}
item=stack(top)
{
cout << "Element popped off from stack is : " << endl;
top--;
}
}
10/20/2023 18
Data Structures and Algorithms
19. Linked list DS
Linked list is a linear data structure that includes a series of connected nodes. In
which the nodes that are randomly stored in the memory. A node in the linked list
contains two parts, i.e., first is the data part and second is the address part. The last
node of the list contains a pointer to the null.
Representation of a Linked list
Linked list can be represented as the connection of nodes in which each node
points to the next node of the list.
10/20/2023 19
Data Structures and Algorithms
20. How to declare a linked list?
The declaration of linked list is given as follows -
struct node
{
int data;
struct node *next;
}
In the above declaration, we have defined a structure named
as node that contains two variables, one is data that is an
integer type, and another one is next that is a pointer which
contains the address of next node.
10/20/2023 20
Data Structures and Algorithms
21. Types of Linked list
Singly Linked List
It is the most common. Each node has data and a pointer to the next node. It is forward only.
Doubly Linked List
We add a pointer to the previous node in a doubly-linked list. Thus, we can go in either direction: forward or backward.
10/20/2023 21
Data Structures and Algorithms
22. Cont…
Circular Linked List
A circular linked list is a sequence of elements in which each node has a link to the
next node, and the last node is having a link to the first node.
The representation of the circular linked list will be similar to the singly linked list,
as shown below:
A circular linked list can be either singly linked or doubly linked.
10/20/2023 22
Data Structures and Algorithms
23. Representation
Representation of the node in a singly linked list
struct node
{
int data;
struct node *next;
}
Representation of the node in a doubly linked list
struct node
{
int data;
struct node *next;
struct node *prev;
}
10/20/2023 23
Data Structures and Algorithms
24. Queue DS
A Queue is defined as a linear data structure that is open at both ends and the
operations are performed in First In First Out (FIFO) order.
We define a queue to be a list in which all additions to the list are made at one end, and
all deletions from the list are made at the other end. The element which is first pushed
into the order, the operation is first performed on that.
10/20/2023 24
Data Structures and Algorithms
25. Principle of Queue
A Queue is like a line waiting to purchase tickets, where the first person in line is the
first person served. (i.e. First come first serve).
Position of the entry in a queue ready to be served, that is, the first entry that will be
removed from the queue, is called the front of the queue(sometimes, head of the
queue), similarly, the position of the last entry in the queue, that is, the one most
recently added, is called the rear (or the tail) of the queue.
10/20/2023 25
Data Structures and Algorithms
26. Queue Representation:
Like stacks, Queues can also be represented in an array: In this representation, the
Queue is implemented using the array.
Queue: the name of the array storing queue elements.
Front: the index where the first element is stored in the array representing the queue.
Rear: the index where the last element is stored in an array representing the queue.
Basic operation
Enqueue() - Insertion of elements to the queue.
Dequeue() - Removal of elements from the queue.
Rule
Insertion only from one end and deletion from another end.
10/20/2023 26
Data Structures and Algorithms
27. Enqueue() Operation
The following steps should be followed to insert (enqueue) data
element into a queue .
Step 1: Check if the queue is full.
Step 2: If the queue is full, Overflow error.
Step 3: If the queue is not full, increment the rear pointer to point
to the next available empty space.
Step 4: Add the data element to the queue location where the rear
is pointing.
Step 5: Here, you have successfully added.
10/20/2023 27
Data Structures and Algorithms
29. Implementation of queue
int f = - 1, r = - 1, n=3;
To enqueue an element
void enqueue()
{
int val;
if (r == n-1 )
cout <<"Queue Overflow"<<endl;
else
{
if (f == - 1)
f = 0;
cout <<"Insert the element in queue : "<<endl;
cin>>val;
r++;
q[r] = val;
}
}
10/20/2023 29
Data Structures and Algorithms
30. Tree Data Structure
We already discussed a linear data structures like an array, linked list, stack and queue in which all the
elements are arranged in a sequential manner.
A tree is also one of the data structures that represent hierarchical data. Suppose we want to show the
employees and their positions in the hierarchical form then it can be represented as shown below:
10/20/2023 30
Data Structures and Algorithms
31. Tree Terminology
Root: The root node is the topmost node in the tree hierarchy. root node doesn't have any parent.
Child node: If the node is a descendant of any node, then the node is known as a child node.
Parent: If the node contains any sub-node, then that node is said to be the parent of that sub-node.
Sibling: The nodes that have the same parent are known as siblings.
Leaf Node:- The node of the tree, which doesn't have any child node, is called a leaf node.
Internal nodes: A node has at least one child node known as an internal node.
Ancestor node:- An ancestor of a node is any predecessor node on a path from the root to that
node. The root node doesn't have any ancestors. In the tree shown in the above image, nodes 1, 2,
and 5 are the ancestors of node 10.
Descendant: The immediate successor of the given node is known as a descendant of a node. In the
above figure, 10 is the descendant of node 5.
What is a common ancestor of 6 and 7 ?
How many sub trees are there for node 1?
10/20/2023 31
Data Structures and Algorithms
32. Con…
Number of edges: If there are n nodes, then there would n-1 edges. Each arrow in the
structure represents the link or path. Each node, except the root node, will have at least
one incoming link known as an edge. There would be one link for the parent-child
relationship.
Depth of node x: The depth of node x can be defined as the length of the path from the
root to the node x. One edge contributes one-unit length in the path. So, the depth of
node x can also be defined as the number of edges between the root node and the node x.
The root node has 0 depth.
Height of node x: The height of node x can be defined as the longest path from the node
x to the leaf node.
10/20/2023 32
Data Structures and Algorithms
33. Binary Tree
Binary tree: a tree in which each node has at most two children.
10/20/2023 33
Data Structures and Algorithms
Full binary tree: a binary tree where each node has either 0 or 2 children.
34. Cont…
Balanced binary tree: a binary tree where each node except the leaf nodes has
left and right children and all the leaves are at the same level.
10/20/2023 34
Data Structures and Algorithms
35. Binary search tree
Every node has a key and no two elements have the same key.
The keys in the right subtree are larger than the key in the root.
The keys in the left subtree are smaller than the key in the root.
The left and the right subtrees are also binary search trees.
Examples of Binary Search Tree.
10/20/2023 35
Data Structures and Algorithms
36. Traversing (Visiting) in a BST
Binary search tree can be traversed in three ways.
Preorder traversal:- traversing binary tree in the order of parent, left and right.
In order traversal:- traversing binary tree in the order of left, parent and right.
Post order traversal:- traversing binary tree in the order of left, right and parent.
Example:
Preorder traversal: 10, 6, 4, 8, 7, 15, 14, 12, 11, 13, 18, 16, 17, 19
In order traversal: 4, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 Used to display nodes in ascending
order.
Post order traversal: 4, 7, 8, 6, 11, 13, 12, 14, 17, 16, 19, 18, 15, 10
10/20/2023 36
Data Structures and Algorithms
37. Implementation of Tree
The tree data structure can be created by creating the nodes dynamically with the help
of the pointers. The tree in the memory can be represented as shown below:
The above figure shows the representation of the tree data structure in the memory. In
the above structure, the node contains three fields. The second field stores the data; the
first field stores the address of the left child, and the third field stores the address of the
right child.
10/20/2023 37
Data Structures and Algorithms
38. Cont…
10/20/2023 38
Data Structures and Algorithms
In programming, the structure of a node can be defined as:
struct node
{
int data;
struct node *left;
struct node *right;
}
39. Graphs in Data Structure
• A graph is a non-linear kind of data structure made up of nodes or vertices and
edges. The edges connect any two nodes in the graph, and the nodes are also
known as vertices.
This graph has a set of vertices V= { 1,2,3,4,5} and a set of edges
E= { (1,2),(1,3),(2,3),(2,4),(2,5),(3,5),(4,5}.
10/20/2023 39
Data Structures and Algorithms
40. Types of Graphs in Data Structures
Finite Graph:-The graph G=(V, E) is called a finite graph if the number of vertices
and edges in the graph is limited in number.
Infinite Graph:- The graph G=(V, E) is called a finite graph but if the number of vertices and edges in
the graph is endless.
10/20/2023 40
Data Structures and Algorithms
41. Cont…
Weighted Graph:- A graph G= (V, E) is called a labeled or weighted graph because each edge has a
value or weight representing the cost of traversing that edge.
Directed Graph:- A directed graph is a set of nodes connected by edges, each with a direction.
10/20/2023 41
Data Structures and Algorithms
42. Cont…
Undirected Graph :- An undirected graph comprises a set of nodes and links
connecting them. The order of the two connected vertices is irrelevant and has no
direction. You can form an undirected graph with a finite number of vertices and
edges.
10/20/2023 42
Data Structures and Algorithms
43. Representation of Graphs in Data Structures
Graphs in data structures are used to represent the relationships between objects. Every graph consists
of a set of points known as vertices or nodes connected by lines known as edges. The vertices in a
network represent entities.
Basically Let us look three representation using matrix
1. Undirected Graph Representation
10/20/2023 43
Data Structures and Algorithms
44. Cont…
2. Directed Graph Representation
3. Weighted Undirected Graph Representation
10/20/2023 44
Data Structures and Algorithms
45. Graph Traversal Algorithm
There are two techniques to implement a graph traversal algorithm:
Breadth-first search(BFS)
Depth-first search(DFS)
BFS:- It begins at the root of the graph and investigates all nodes at the current depth level before moving
on to nodes at the next depth level.
10/20/2023 45
Data Structures and Algorithms
46. Depth-First Search(DFS)
DFS:- The strategy followed by depth-first search is, as its name implies, to search "deeper" in the
graph whenever possible. Depth-first search explores edges out of the most recently discovered vertex
v that still has unexplored edges leaving it.
DFS: 1,4,3,10,9,2,8,7,5,6 Use stack data structure for DFS
10/20/2023 46
Data Structures and Algorithms
47. All about chapter three
10/20/2023 47
Data Structures and Algorithms
Thank You !!!