What do you want to save?
Add Code snippet
New code examples
-
C 2021-10-15 11:38:05
stack implementation using linked list in c
#include <stdio.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 struct node { int data; struct node *next; }; typedef struct node node; node *top; void initialize() { top = NULL; } void push(int value) { node *tmp; ... Add solution -
Other 2021-10-15 07:07:07
bfs traversal code
// BFS algorithm in C #include <stdio.h> #include <stdlib.h> #define SIZE 40 struct queue { int items[SIZE]; int front; int rear; }; struct queue* createQueue(); void enqueue(struct queue* q, int); int dequeue(struct queue* q); void d... Add solution -
Other 2021-10-15 03:27:10
doubly linked list example
//insert link at the first location void insertFirst(int key, int data) { //create a link struct node *link = (struct node*) malloc(sizeof(struct node)); link->key = key; link->data = data; if(isEmpty()) { //make it the last ... Add solution -
Java 2021-10-11 16:51:04
Linked List implementation
typedef struct node{ int value; //this is the value the node stores struct node *next; //this is the node the current node points to. this is how the nodes link }node; node *createNode(int val){ node *newNode = malloc(sizeof(node)); newNo... Add solution