What do you want to save?
Add Code snippet
New code examples
-
C 2021-09-24 18:41:03
insertion singly linked list in c
/** * C program to insert a new node at the beginning of a Singly Linked List */ #include <stdio.h> #include <stdlib.h> /* Structure of a node */ struct node { int data; // Data struct node *next; // Address }*head; v... Add solution -
-
C++ 2021-09-21 01:21:02
queue using linked list c++
/* * Program : Queue using linked list * Language : C */ #include<stdio.h> #include<stdlib.h> struct node { int data; struct node *next; }; struct node *front = NULL, *rear = NULL; void enqueue(int val) { struct node *newNo... Add solution -
Python 2021-09-20 08:44:02
stack example in python
#using doubly linked list from collections import deque myStack = deque() myStack.append('a') myStack.append('b') myStack.append('c') myStack deque(['a', 'b', 'c']) myStack.pop() 'c' myStack.pop() 'b' myStack.pop() 'a' myStack.pop() #Traceback (most ... Add solution -
Other 2021-09-17 12:26:03
collection.sort time complexity
t array. It is well-suited to merging two or more sorted arrays: simply concatenate the arrays and sort the resulting array. The implementation was adapted from Tim Peters's list sort for Python ( TimSort). It uses techiques from Peter McIlroy's "Op... Add solution -
C 2021-09-15 22:59:02
Write a C program to search an existing element in singly linked list
#include <stdio.h> #include <stdlib.h> struct node { int num; struct node *nextptr; } stnode, *ennode; int FindElement(int); void main() { int n,i,FindElem,FindPlc; stnode.nextptr=NULL; ennode=&stnode; printf("\n\n Linked... Add solution -
C 2021-09-11 08:23:04
reverse a singly linked list in c
/** * C program to reverse a Singly Linked List */ #include <stdio.h> #include <stdlib.h> /* Structure of a node */ struct node { int data; //Data part struct node *next; //Address part }*head; /* Functions used in the program *... Add solution -
Other 2021-09-10 05:03:01
linked list head and tail
import java.util.Iterator; // Custom Linked List class using Generics class List<T> implements Iterable<T> { Node<T> head, tail; // add new Element at tail of the linked list in O(1) public void add(T data) { Node<T>... Add solution