Untitled

mail@pastecode.io avatar
unknown
plain_text
11 days ago
892 B
2
Indexable
Never
#include <stdio.h>

#include <stdlib.h>

Struck Node

int data;

Struct Node next; Strict Node* prev;

int get length (Struct Node node);

vad insert start (struct Nodert head, int data)

{

Strud Nodet new node (struct Node) malloc (size of (struct Nade));

new node dat a = data;

newnode next = head;

new wode prev = NULL;

if (head = NULL)

(head) prove new nodei

head-new Node;

}

void insert Last (struct Node *head. int data)

{

Avanthi Institute of Engineering & Technology

Gunthapally (V), Abdullapurmet (M) Near Ramoji Filimcity, R.R.Dist, Hyderabad

Roll No

Expt No

Date

Sheet No:14

Strust Node new Node (struct Node*) malloc (size of(struct Nodell:

new Node data-data;

new Node next = NOLL;

if thead= NULL)

1

#head= new Node;

new Node preveNoll;

return;

Struct Node temp = "head;

while (temp next != NULL)

temp temp next;

tempnext newNode.

newNode prevs temp;
Leave a Comment