Skip to content

Instantly share code, notes, and snippets.

View jamesgeorge007's full-sized avatar

James George jamesgeorge007

View GitHub Profile
@jamesgeorge007
jamesgeorge007 / bst_operations.c
Last active November 20, 2018 16:45
Binary Search Tree operations in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
struct Node* prev;
};
@jamesgeorge007
jamesgeorge007 / bubblesort.c
Created November 17, 2018 15:12
Various sorting techniques available in C
#include<stdio.h>
int main()
{
int arr[25], n, i, j, temp;
printf("\n Number of elements: ");
scanf("%d", &n);
printf("\nEnter the elements: ");
for(i = 0;i < n; i++)
scanf("%d", &arr[i]);
@jamesgeorge007
jamesgeorge007 / doublyLinkedListOperations.c
Created November 12, 2018 18:25
Doubly Linked-list operations implemeted in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* left;
struct Node* right;
};
@jamesgeorge007
jamesgeorge007 / polynomialAdditionLL.c
Last active September 25, 2023 01:59
Polynomial Addition using Linked list.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int coeff;
int pow;
struct Node* next;
};
@jamesgeorge007
jamesgeorge007 / queueImplementation.c
Created October 20, 2018 05:21
Queue implemented using Linked list in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
};
int count = 0;
@jamesgeorge007
jamesgeorge007 / stackImplementation.c
Created October 19, 2018 17:02
Stack implementation using linked list in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* next;
};
struct Node* top = NULL;
@jamesgeorge007
jamesgeorge007 / polynomialAddition.c
Created October 19, 2018 17:01
Polynomial Addition using array of structures in C.
struct Polynomial
{
int coeff;
int exp;
};
struct Polynomial first[15], second[15], result[15];
void display(struct Polynomial poly[], int terms)
{
@jamesgeorge007
jamesgeorge007 / linkedlistOperations.c
Last active October 19, 2018 17:02
Linked list operations implemented in C.
#include<stdio.h>
#include<stdlib.h>
struct Node
{
int data;
struct Node* link;
};
struct Node* header = NULL;
int getSize()
@jamesgeorge007
jamesgeorge007 / dequeOperations.c
Last active October 7, 2018 13:47
Insertion and deletion operations on a Deque.
#include<stdio.h>
#include<stdlib.h>
#define SIZE 15
int Deque[SIZE], front = -1, rear = -1;
void display()
{
int i;
@jamesgeorge007
jamesgeorge007 / circularQueueOperations.c
Last active September 30, 2018 13:49
Insertion and deletion operations on a circular Queue.
#include<stdio.h>
#include<stdlib.h>
#define SIZE 15
int Queue[SIZE], front = -1, rear = -1;
void display()
{
int i;