What do you want to save?
Add Code snippet
New code examples
-
C 2021-09-18 00:40:03
huffman coding using heap in c
// Huffman Coding in C #include <stdio.h> #include <stdlib.h> #define MAX_TREE_HT 50 struct MinHNode { char item; unsigned freq; struct MinHNode *left, *right; }; struct MinHeap { unsigned size; unsigned capacity; struct MinHNo... 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 13:58:02
how to allocate memory for pointer in c
c=(char(*)[20])malloc(sizeof(char)*20); 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 -
C 2021-09-09 02:12:03
circular linked list in c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> struct node { int data; int key; struct node *next; }; struct node *head = NULL; struct node *current = NULL; bool isEmpty() { return ... Add solution -
C 2021-09-09 00:28:02
implement stack using link 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 -
C++ 2021-09-08 03:04:04
c++ debug memory allocation
// use valgrind for linux // use -fmudflap -lmudflap options with gcc, then start your program with MUDFLAP_OPTIONS=-print-leaks ./my_program. template<typename T> struct track_alloc : std::allocator<T> { typedef typename std::allocator&l... Add solution