This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void test() | |
{ | |
System.out.println("test"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.mortbay.jetty</groupId> | |
<artifactId>maven-jetty-plugin</artifactId> | |
<version>6.1.10</version> | |
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- GATES --> | |
<dependency> | |
<groupId>uk.ac.gate</groupId> | |
<artifactId>gate-core</artifactId> | |
<version>7.0</version> | |
</dependency> | |
<!--Apache commons pool--> | |
<dependency> | |
<groupId>commons-pool</groupId> | |
<artifactId>commons-pool</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BinarySearchTree { | |
void in_order_tree_walk(Node x) { | |
in_order_tree_walk(x.left); | |
System.out.println(x.key); | |
in_order_tree_walk(x.right); | |
} | |
void insert(Node T, Node x) { | |
Node y = T; | |
while (y != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
public class SingleLinkedList { | |
Node head; | |
int i = 0; | |
void insert(SingleLinkedList li, Node x) { | |
x.next = li.head; | |
li.head = x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkedList { | |
Node head; | |
void insert(LinkedList li, Node x) { | |
x.next = li.head; | |
if (li.head != null) { | |
li.head.pre = x; | |
} | |
li.head = x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Stack { | |
int s[] = new int[100]; | |
int top = -1; | |
boolean isEmpty(Stack s) { | |
if (s.top < 0) { | |
return true; | |
} else | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BubbleSort { | |
public static void main(String args[]) { | |
int a[] = { 2, 3, 6, 1, 9, 2, 10, 5 }; | |
int sorted[] = buble(a); | |
for (int x : sorted) { | |
System.out.print(x + " "); | |
} | |
} | |
public static int[] buble(int a[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InsertionSort { | |
public static void main(String a[]) { | |
int data[] = { 9, 2, 6, 1, 8, 10, 1, 0 }; | |
int sortedarr[] = insertionSort(data); | |
for (int x : sortedarr) { | |
System.out.print(x + " "); | |
} | |
} | |
public static int[] insertionSort(int array[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class QuickSort | |
{ | |
int a[]; | |
QuickSort(int a[]) | |
{ | |
this.a=a; | |
} | |
int[] sort() |
OlderNewer