What is DSA ?
What are different types of data structures ?
Primitive and Non Primitive DSA
Arrays
Queue
Stack
Linked List
Memory representation of Linked Lists
this presentation is made for the students who finds data structures a complex subject
this will help students to grab the various topics of data structures with simple presentation techniques
best regards
BCA group
(pooja,shaifali,richa,trishla,rani,pallavi,shivani)
This is a presentation on Linked Lists, one of the most important topics on Data Structures and algorithms. Anyone who is new to DSA or wants to have a theoretical understanding of the same can refer to it :D
This presentations gives an introduction to the data structure linked-lists. I discuss the implementation of header-based linked-lists in C. The presentation runs through the code and provides the visualization of the code w.r.t pointers.
What is Link list? explained with animationsPratikNaik41
This Presentation expalins what are data structures and linked lists with animations.
It also contains a sample implementation of Linked List using C++language.
It uses C++ Pointers to define linked lists.
DATA STRUCUTRES AND LINKED LIST
WHAT ARE DATA STRUCTURES?
Classification Of Data Structures ?
WHAT IS LINKED LIST?
WHY USE LINKED LIST?
INSERTION AND DELETION IN LINKED LIST
LINKED LIST CODE
this presentation is made for the students who finds data structures a complex subject
this will help students to grab the various topics of data structures with simple presentation techniques
best regards
BCA group
(pooja,shaifali,richa,trishla,rani,pallavi,shivani)
This is a presentation on Linked Lists, one of the most important topics on Data Structures and algorithms. Anyone who is new to DSA or wants to have a theoretical understanding of the same can refer to it :D
This presentations gives an introduction to the data structure linked-lists. I discuss the implementation of header-based linked-lists in C. The presentation runs through the code and provides the visualization of the code w.r.t pointers.
What is Link list? explained with animationsPratikNaik41
This Presentation expalins what are data structures and linked lists with animations.
It also contains a sample implementation of Linked List using C++language.
It uses C++ Pointers to define linked lists.
DATA STRUCUTRES AND LINKED LIST
WHAT ARE DATA STRUCTURES?
Classification Of Data Structures ?
WHAT IS LINKED LIST?
WHY USE LINKED LIST?
INSERTION AND DELETION IN LINKED LIST
LINKED LIST CODE
This PPT is about "Double Linked List" concept of Data Structure and Algorithm. It is very informatively describe its each concept with example and also pros and cons..
If anyone has Question related to this they may ask freely.
:)
Linked Lists: Introduction Linked lists
Representation of linked list
operations on linked list
Comparison of Linked Lists with Arrays and Dynamic Arrays
Types of Linked Lists and operations-Circular Single Linked List, Double Linked List, Circular Double Linked List
Arrays In Python | Python Array Operations | EdurekaEdureka!
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Arrays in Python' will help you establish a strong hold on all the fundamentals in the Python programming language. Below are the topics covered in this PPT:
What is an array?
Is python list same as an array?
How to create arrays in python?
Accessing array elements
Basic array operations
- Finding the length of an array
- Adding Elements
- Removing elements
- Array concatenation
- Slicing
- Looping
Python Tutorial Playlist: https://goo.gl/WsBpKe
Blog Series: http://bit.ly/2sqmP4s
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Std 12 computer chapter 6 object oriented concepts (part 1) by Nuzhat Memon
Introduction to class and object
Procedural (Structural) programming language
Object Oriented programming language
Two ways of programming language (POP and OOP)
four specific object properties
4 pillars of OOPs
Encapsulation in Java
Abstraction in Java
Messaging in Java
Polymorphism in Java
In computer science, a linked list is a linear collection of data elements, whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequence.
The normal forms (NF) of relational database theory provide criteria for determining a table’s degree of vulnerability to logical inconsistencies and anomalies.
Linked List if you don't know anything about linked list than you should read this slide.this is very simple knowledge of linked list.
Hope you like
if you like this then pls share
This PPT is about "Double Linked List" concept of Data Structure and Algorithm. It is very informatively describe its each concept with example and also pros and cons..
If anyone has Question related to this they may ask freely.
:)
Linked Lists: Introduction Linked lists
Representation of linked list
operations on linked list
Comparison of Linked Lists with Arrays and Dynamic Arrays
Types of Linked Lists and operations-Circular Single Linked List, Double Linked List, Circular Double Linked List
Arrays In Python | Python Array Operations | EdurekaEdureka!
** Python Certification Training: https://www.edureka.co/python **
This Edureka PPT on 'Arrays in Python' will help you establish a strong hold on all the fundamentals in the Python programming language. Below are the topics covered in this PPT:
What is an array?
Is python list same as an array?
How to create arrays in python?
Accessing array elements
Basic array operations
- Finding the length of an array
- Adding Elements
- Removing elements
- Array concatenation
- Slicing
- Looping
Python Tutorial Playlist: https://goo.gl/WsBpKe
Blog Series: http://bit.ly/2sqmP4s
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Std 12 computer chapter 6 object oriented concepts (part 1) by Nuzhat Memon
Introduction to class and object
Procedural (Structural) programming language
Object Oriented programming language
Two ways of programming language (POP and OOP)
four specific object properties
4 pillars of OOPs
Encapsulation in Java
Abstraction in Java
Messaging in Java
Polymorphism in Java
In computer science, a linked list is a linear collection of data elements, whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequence.
The normal forms (NF) of relational database theory provide criteria for determining a table’s degree of vulnerability to logical inconsistencies and anomalies.
Linked List if you don't know anything about linked list than you should read this slide.this is very simple knowledge of linked list.
Hope you like
if you like this then pls share
Linked List is a linear data structure which consists of group of nodes in a sequence which is divided in two parts. Each node consists of its own data and the address of the next node and forms a chain.
The first part contains information of the element and second part contains next pointer address of the next element in list.
They are a dynamic in nature which allocates the memory when required.
Insertion and deletion operations can be easily implemented.
Stacks and queues can be easily executed.
Linked List reduces the access time.
The memory is wasted as pointers require extra memory for storage.
No element can be accessed randomly; it has to access each node sequentially.
Reverse Traversing is difficult in linked list.
Linked lists are used to implement stacks, queues, graphs, etc.
Linked lists let you insert elements at the beginning and end of the list.
In Linked Lists we don't need to know the size in advance.
A linked list is a linear data structure where each element (node) is a separate object, connected to the previous and next elements by references. The first element is referred to as the head of the linked list and the last element is referred to as the tail. The nodes in a linked list can store data or simply act as a reference to the next node. Linked lists have several advantages, such as dynamic sizing and easy insertion and deletion of elements. They are commonly used in a variety of applications, such as implementing stacks, queues, and dynamic memory allocation.
There are several types of linked lists, including:
1. Singly linked list: Each node has a reference to the next node in the list.
2. Doubly linked list: Each node has a reference to both the next and previous node in the list.
3. Circular linked list: The last node in the list points back to the first node, creating a loop.
4. Multilevel linked list: Each node in a linked list can contain another linked list.
5. Doubly Circular linked list: Both the first and last node points to each other, forming a circular loop.
6. Skip list: A probabilistic data structure where each node has multiple references to other nodes.
7. XOR linked list: Each node stores the XOR of the addresses of the previous and next nodes, rather than actual addresses.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Linked list (1).pptx
1. DATASTRUCTURE
DATRUCTURE IS THE WAY OF
ORGANIZING ALL DATA ITEMS IN
ORDER THAT NOT ONLY ELEMENTS
TO BE STORED BUT ALSO THE
RELATION BETWEEN THEELEMENTS
2. INTRODUCTION
Data structure:-A data structure is a
logical representation of data and
operation that can be performed on
the data.
1)linear data structure
2)Non linear data structure
Linear data structure is an order of
data elements. They are arrays,
stacks, queues, and linked lists.
3. Linked list :- linked list is a linear data
structure. It contains nodes. Each node
contains two parts, i.e. DATApart and
LINK part.
The data contains elements and
Link contains address of another node.
4. LIMITATIONS OF ARRAYS
Arrays are simple to understand and
elements of an array are easily
accessible
But arrays have some limitations.
Arrays have a fixed dimension.
Once the size of an array is decided it
can not be increased or decreased
during education.
5. Array elements are always stored in
contiguous memory locations.
Operations like insertion or deletion of
the array are pretty tedious.
T
o over come this limitations we use
linked list.
6. LINKED LISTS
Linked list is a collection of elements called
nodes.
Each node contains two parts. they are
data part and link part.
Node
data link
7. 100
200
400
• The above figure shows the example of
marks obtained by different students
can be stored in a linked list
• Here N-stands for NULL.
• Null indicates the end of the node.
14 100 30 400 42 N
8. WHAT ARE LINKEDLISTS
A linked list is a linear data
structure.
Nodes make up linked lists.
Nodes are structures made
up of data and a pointer to
another node.
Usually the pointer is called
next.
9. What is Linked List?
A linked list is a collection of nodes with various fields
It contains data field and Address field or Linkfield
Info field Link Field/
Address Field
Pointer to the
first node
10. ARRAYS VS LINKEDLISTS
Arrays Linked list
Fixed size: Resizing is expensive Dynamic size
Insertions and Deletions are inefficient:
Elements are usually shifted
Insertions and Deletions are efficient: No
shifting
Random access i.e., efficient indexing No random access
Not suitable for operations requiring
accessing elements by index such as sorting
No memory waste if the array is full or almost
full; otherwise may result in much memory
waste.
Since memory is allocated dynamically(acc. to
our need) there is no waste of memory.
Sequential access is faster [Reason: Elements in
contiguous memory locations]
Sequential access is slow [Reason: Elements not
in contiguous memory locations]
11. TYPES OF LINKED LISTS
1. Single linked list
2. Double linked list
3. Circular linked list
4. Circular double linked list
12. SINGLE LINKED LIST :-
• A single linked list is one in which all
nodes are linked together in some
sequential manner.
• CIRCULAR LINKED LIST :-
• A circular linked list is one which has
no beginning and no ending. The null
pointer in the last node of a linked list
is replaced with the address of its first
node such a list is called circular linked
list.
15. SINGLE LINKED LIST :
Start
CIRCULAR LINKED LIST:-
100 200
35 N
60 200
45 100
60 200 35 400
45 100
400
500
16. Inserting a new node :
Before inserting:
100 200
400
After inserting:
400 100
200
20 N
35 200
14 100
20 N
35 200
14 100
75 400
17. Delete a node from the list:
before deletion:
300 500
200 400
after deletion :
200 300 500
46 500
48 300
35 400 30 N
30 N
46 500
35 300
18. In circular linked list we have three
functions. They are
• addcirq( )
• delcirq( )
• cirq_display( )
19. function accepts three
addcirq( ) :-
This
parameters.
First parameter receives the address
of the first node.
The second parameter receives the
address of the pointer to the last node.
20. Delcirq( ) :-
This function receives two parameters.
The first parameter is the pointer to the
front node.
The second is the pointer to the rear.
front rear
10 5
16
17
21. .DOUBLE LINKED LIST :-
has some
A single linked list
disadvantages
• That it can traverse it in one direction.
searching
travelling
• Many applications require
backword and forword
sections of a list
22. • A two way list is a linear collection of
data elements called nodes.
• When each node is divided into three
parts. They are two link parts and one
data part.
node
prev data next
23. Doubly Linked list
Contains the address of previous node and
next node
NULL
2000 3000
1000
10 2000 2000 20 NU LL
1000 15 3000
First
24. Inserting a new node :
Before insertion:-
100 400
200
After insertion:-
100 40 N
200 20 400
N 11 100
100 40 N
400 25 100
N 11 100 200 20 400
25. Delete a node from the list:
Before deletion:-
600 200 400
After deletion:-
200 400
200 4 N
600 11 400
N 5 200
N 11 400 200 4 N
26. Circular Doubly Linked list
Contains the address of first node and last
node
3000
2000 3000
1000
10 2000 2000 00
20 10
1000 15 3000
First
27. REVERSING THE LINKS :
Reversing means the last node
becomes the first node and the first
becomes the last.
N
5 23 3 17
17
3
23
5 N
23
3
17
5
28. MERGING OF LINKED LIST :
• suppose we have two linked lists.
• That are pointed to two independent
pointers. We have to merge the two
links into a third list.
• By using this merge ( ) to ensure that
those elements which are common to
both the lists occur only once in the
third list.
30. SORTING OF A LINKED LIST :
• Sorting means to arrange the elements
either in ascending or descending
order.
• To sort the elements of a linked list we
use any of the standard sorting
algorithms for carrying out the sorting.
• While performing the sorting, when it is
time to exchange two elements, we
can adopt any of the following two
strategies.
31. 1)Exchange the data part of the two
nodes, keeping the links intact.
8 N
4
3
2
3 N
4
8
2
32. 2) Keep the data in the nodes intact.
the
order
links such that
of the nodes
Simply readjust
effectively the
changes
200 400 0 600
11 N
4 40
0
8 60
0
2 50
0
11 N
4 600
8 500
2 400
33. RECURSIVE OPERATIONS ON LINKED
LIST :
A function called by itself known as
recursion.
If a statement within the body of a
function calls the same function.
Some of the operations that are carried
out on linked list can be easily
implemented using recursion.
34. For example finding out the number of
nodes present in a linked list, comparing
two lists, copying one linked list into
another, adding a new node at the end
of the linked list, etc.,
35. OPERATIONS ON LINKED LISTS
The basic operations on linked lists are
1. Creation
2. Insertion
3. Deletion
4. Traversing
5. Searching
6. Concatenation
7. Display
36. • The creation operation is used to
create a linked list.
• Insertion operation is used to insert a
new node in the linked list at the
specified position. A new node may be
inserted at the beginning of a linked list ,
at the end of the linked list , at the
specified position in a linked list. If the
list itself is empty , then the new node is
inserted as a first node.
37. • Deletion operation is used to delete on
item from the linked list. It may be deleted
from the beginning of a linked list ,
specified position in the list.
• Traversing operation is a process of
going through all the nodes of a linked list
from one end to the another end. If we
start traversing from the very first node
towards the last node , It is called
forward traversing.
38. • If the traversal start from the last node
towards the first node , it is called back
word traversing.
• Searching operation is a process of
accessing the desired node in the list.
We start searching node –by-node and
compare the data of the node with the
key.
39. • Concatenation operation is the process
of appending the second list to the end
of the first list. When we concatenate
two lists , the resultant list becomes
larger in size.
• The display operation is used to print
each and every node’s information.
40. BASICOPERATIONS ON A LIST
• Creating a List
• Inserting an element in a list
• Deleting an element from a list
• Searching a list
• Reversing a list
41. INSERTION AT THE BEGINNING
There are two steps to be followed:-
a) Make the next pointer of the node point
towards the first node of the list
b) Make the start pointer point towards this new
node
If the list is empty simply make the start pointer
point towards the new node;
42. INSERTING THE NODE IN A SLL
There are 3 cases here:-
Insertion at the beginning
Insertion at the end
Insertion after a particular node
43.
44. INSERTING AT THE END
Here we simply need to make the next
pointer
of the last node point to the new node
45. INSERTING AFTER AN ELEMENT
Here we again need to do 2 steps :-
Make the next pointer of the node to be inserted
point to the next node of the node after which you
want to insert the node
Make the next pointer of the node after which the
node is to be inserted, point to the node to be
inserted
46.
47. DELETING A NODE INSLL
Here also we have three cases:-
Deleting the first node
Deleting the last node
Deleting the intermediate node
48. DELETING THE FIRST NODE
three
two
one
Here we apply 2 steps:-
Making the start pointer point towards the 2nd
node
Deleting the first node using delete keyword
s t a r t
49. DELETING THE LAST NODE
node1 node2 node3
Here we apply 2 steps:-
Making the second last node’s next pointer point
to NULL
Deleting the last node via delete keyword
start
50. DELETING A PARTICULARNODE
Here we make the next pointer of the node
previous to the node being deleted ,point to
the successor node of the node to be deleted
and then delete the node using delete
keyword
node1 node2 node3
To be deleted
51. SEARCHING
Searching involves finding the required element in the
list
We can use various techniques of searching like linear
search or binary search where binary search is more
efficient in case of Arrays
But in case of linked list since random access is not
available it would become complex to do binary search
in it
We can perform simple linear search traversal
In linear search each node is traversed till the data
in the node matches with the required value
52. REVERSING A LINKEDLIST
• We can reverse a linked list by reversing the
direction of the links between 2 nodes
53. Operation ID-Array Complexity Singly-linked list Complexity
Insert at beginning O(n) O(1)
Insert at end O(1) O(1) if the list has tail reference
O(n) if the list has no tail reference
Insert at middle O(n) O(n)
Delete at beginning O(n) O(1)
Delete at end O(1) O(n)
Delete at middle O(n):
O(1) access followed by O(n)
shift
O(n):
O(n) search, followed by O(1) delete
Search O(n) linear search
O(log n) Binary search
O(n)
Indexing: What is
the element at a
given position k?
O(1) O(n)
COMPLEXITY OF VARIOUS
OPERATIONS IN ARRAYS AND SLL
54. DOUBLY LINKED LIST
1. Doubly linked list is a linked data structure that consists of a set of
sequentially linked records called nodes.
2 . Each node contains three fields ::
-: one is data part which contain data only.
-:two other field is links part that are point
or references to the previous or to the next
node in the sequence of nodes.
3. The beginning and ending nodes' previous and next
links, respectively, point to some kind of terminator,
typically a sentinel node or null to facilitate traversal
of the list.
55. NODE
A B
C
A doubly linked list contain three fields: an integer
value, the link to the next node, and the link to the
previous data next
NULL 11 786
786
200 400
200 656 400 786 777 NULL
56. DLL’S COMPARED TOSLL’S
Advantages:
Can be traversed in
either direction (may be
essential for some
programs)
Some operations, such
as deletion and inserting
before a node, become
easier
Disadvantages:
Requires more space
List manipulations are
slower (because more
links must be changed)
Greater chance of
having bugs (because
more links must be
manipulated)
60. Making next and previous pointer of the node to be
inserted point accordingly
Adjusting the next and previous pointers of the nodes b/w
which the new node accordingly
INSERTING AFTER A NODE
61. DELETING A NODE
• Node deletion from a DLL involves changing two links
• In this example,we will delete node b
myDLL
a b c
• We don’t have to do anything about the links in node
b
• Garbage collection will take care of deleted nodes
• Deletion of the first node or the last node is a special
case
62. ADVANTAGES OF LINKEDLISTS
•We can dynamically allocate memory
space as needed
•We can release the unused space in the
situation where the allocated space
seems to be more.
•Operation related to data elements like
insertions or deletion are more
simplified.
63. •Operation like insertion or deletion are
less time consuming.
•Linked lists provide flexibility in allowing
the items to be arranged efficiently.