Binary Tree

Node Class public class Node { private int data; private Node leftChild; private Node rightChild; public Node(int data) { this.data = data; this.leftChild = null; this.rightChild = null; } public int getData() { return data;…

Tree

Node Class public class Node { private int data; private ArrayList arraylist; public Node(int data) { this.data=data; this.arraylist=new ArrayList(); } public int getData() { return data; } public void setData(int data) { this.data = data;…

Quick Sort

Quick Sort public class Quicksort { public static void main(String args[]) { int a[] = {4, 2, 3, 1, 6, 5, 0}; quicksort(a, 0, a.length - 1); printArray(a); } private static void printArray(int a[]) {…

Merge Sort

Merge Sort public class Mergesort { public static void main(String args[]) { int a[] = {4, 2, 3, 1, 6, 5, 0}; mergesort(a, 0, a.length - 1); printArray(a); } private static void printArray(int a[]) {…

Linked List

Node class /** * * @author GOKUL */ public class Node { private int data; private Node next; public Node(int data,Node next) { this.data=data; this.next=next; } public int getData() { return data; } public void…