Tags » Linked List

DISPLAY LINKED LIST FUNCTION

/***********DISPLAY LINKED LIST FUNCTION START*****/

void display(node *p)
{
while(p!=NULL)
{
printf(“%d”,p->data);
p=p->next;
}
}

CREATING LINKED LIST FUNCTION

/********************CREATING LINKED LIST FUNCTION START***************/

node *create(node *p,int n)
{
node *new,*temp=p;
new=(node *)malloc(sizeof(node));
new->data=n;
new->next=NULL;
if(p==NULL)
return (new);
else
{
while(temp->next!=NULL)
temp=temp->next;

temp->next=new;
return p;
}
}

VisuAlgo - visualising data structures a

VisuAlgo – visualising data structures and algorithms through animation http://ow.ly/2MdnKn

Karim Oumghar reblogged this on Bits and Pieces of Code and commented:

Excellent site for more visualization of data structures & other algorithms.

Two ways to solve the “Clone Linked List with Random Pointers” problem

the “Clone Linked List with Random Poniters” problem could be find here:

https://oj.leetcode.com/problems/copy-list-with-random-pointer/

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null. 222 more words

Linked List

Reverse A Linked List

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<process.h>
// The data to be linked
struct node
{
int data;
struct node *link;
};
void reverse(struct node **);
int main() 330 more words

Functions