• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 2 páginas
Resumen

Summary Implementation of Doubly Linked List - Data Structures

Document preview thumbnail
Vista previa 1 fuera de 2 páginas

Implementation of Doubly Linked List - Data Structures

Vista previa del contenido

2.10 Implementation of Doubly Linked List - Data
Structures
Jenny's Lectures CS IT
WE are going to represent a doubly-linked list Logically. We have discussed in previous video
introduction of doubly linked list. SO I hope you know the concept of structures how we can use
this structure in C language. WE will declare a variable either a variable or a pointer using that
variable or that pointer. We can access the members of structure. THe code to create. This
linked list code is very much similar to the singly linked list. A function that tells create so now I
'm going to write down that thing also. WE are going to create a node to store this data to insert
the data in the linked list. Initially, we assume that the slist list is empty right. New node is a
pointer pointer pointer that has been created and this point that is going to store what whatever
my loop will return that. 250. and whatever this malloc will return? Where you will we are going
to. store that thing in new node. So here you will write would new nodes. So this is how memory
dynamically the memory has been allocated to this new node...
Head is not a null now head is containing 250 so in that case, how we will insert so in else part
what you will write so now see in the linked list I have only 1 node. I will ask how to update this
link. How you will excess this part of this node. Then you will say ma'am. We have a pointer to
this node. When I want to insert a third node I have created another node running by running
this code again this node. We have inserted this to here the data here. Both the previous and
next pointer is containing null. Now If head is equal to null but head is 100, so head is not and
now we are going to do this else. How do you can access this thing using new node previous is
equal to you will store here what the address of previous one is in M. So I will write here M. now
what do you write in else part? Have you replayed this thing and this thing? How do you access
this part either using head or using M so here? I am accessing this using temp..
address of next node 1 link has been established now Second this how you can access this part
using new node. Previous. PRevious node previous is equal to whatever you will store here.
Address of previous node that is 200 from where we can get 200.. Previous is 200. So is
containing 200 which means new node will be pointing there. When you will create the fourth
node and we have the address of this previous node. The code for the display function for
displaying the content of this list is same as singly linked list function. In next video I will discuss
how to insert a node in singly. linked list at beginning also at any position also and at end also
and after that how to delete data..

Información del documento

Subido en
22 de abril de 2023
Número de páginas
2
Escrito en
2022/2023
Tipo
Resumen
$8.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
19
Última venta
-




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes