Saturday, May 9, 2020

Graph

#include<stdio.h>
int main(){
    int i, j, node, test, cn1, cn2;
    int a[100][100];
    printf("Number of Nodes: ");
    scanf("%d",&node);

Wednesday, August 9, 2017

Heap

#include<iostream>
using namespace std;

void insert_h (int a[],int n) {
    int prnt, child, tmp;
    for(int i = 0; i<n; i++) {
        cin >> a[i];
        child = i;

Monday, June 19, 2017

Swap Two Number

/* Using C */
#include<stdio.h>
int main(){
    int a, b, x;
    printf("Value of A: ");

Print "Hello World" Using if-else Condition.

/* Here "Hello World!" is printed using if-else condition. "Hello" printed in if condition and "World" printed in else condition. */


/* Using C */
#include<stdio.h>

Sunday, June 18, 2017

Linked List in C

/* We can't call insert last or insert any function when our linked list is empty. So if there is no data in our linked list and we want to use insert last or insert any function then we called insert first function there. Again if we have one data in our linked list and we want to use delete the last function, then we called delete the first function */

#include<stdio.h>
#include<stdlib.h>

Queue in C

#include<stdio.h>
#include<stdlib.h>

/*Node*/
struct Node{
    int data;

Stack in C

#include<stdio.h>
#include<stdlib.h>

/*Node*/
struct Node{
    int data;