Skip to content

Instantly share code, notes, and snippets.

View Ajay-Raj-S's full-sized avatar
👋
W0rking with Django

Ajay Raj Ajay-Raj-S

👋
W0rking with Django
View GitHub Profile
@Ajay-Raj-S
Ajay-Raj-S / is-Loop-in-List.java
Created October 15, 2019 11:58
To check for any loop existence in the Linked List
package datastructures;
import java.util.ArrayList;
public class checkLoop {
Node head = null;
Node last = null;
int size = 0;
static class Node {
@Ajay-Raj-S
Ajay-Raj-S / stack-using-LinkedList.java
Last active October 15, 2019 12:00
Stack data structure implementation using Linked List in java
package datastructures;
public class StackUsingLL {
private Node top = null;
private Node head = null;
private int size = 0;
class Node {
int data;
@Ajay-Raj-S
Ajay-Raj-S / binary-search-tree.c
Last active September 22, 2019 02:49
A complete implementation of Binary Search Tree
#include<stdio.h>
#include<stdlib.h>
struct node {
struct node* parent;
struct node* left;
int value;
struct node* right;
};
@Ajay-Raj-S
Ajay-Raj-S / queue-using-array.c
Created September 18, 2019 18:22
Queue using Array in C program.
#include<stdio.h>
#include<stdlib.h>
#define MAX 5
int front = 0;
int last = 0;
int queue[MAX];
void enqueue(int val) {
queue[last++] = val;
@Ajay-Raj-S
Ajay-Raj-S / stack-using-array.c
Created September 18, 2019 18:22
Stack using Array C Program.
#include<stdio.h>
#include<stdlib.h>
#define MAX 10
int top = -1;
int stack[MAX];
void push(int val) {
stack[++top] = val;
printf("Value Pushed!\n");
@Ajay-Raj-S
Ajay-Raj-S / circular-linked-list.c
Last active September 22, 2019 02:50
Circular Linked List Implementation
#include<stdio.h>
#include<stdlib.h>
// circular linked list using Singly Linked list
struct circular {
int value;
struct circular* next;
};
@Ajay-Raj-S
Ajay-Raj-S / doubly-linked-list.c
Last active September 17, 2019 16:05
A simple Doubly Linked List.
#include<stdio.h>
#include<stdlib.h>
struct doubly {
struct doubly* prev;
int value;
struct doubly* next;
};
typedef struct doubly* node;
@Ajay-Raj-S
Ajay-Raj-S / singly-linked-list.c
Last active September 17, 2019 16:19
A simple and explained code on singly linked list.
#include<stdio.h>
#include<stdlib.h>
struct list {
int value;
struct list* next;
};
struct list* root = NULL;
struct list* lastNodeAddr = NULL;