diff --git a/DataStructuresAlgorithms/src/DataStructures.java b/DataStructuresAlgorithms/src/DataStructures.java index dc79ffa..7daa4ee 100644 --- a/DataStructuresAlgorithms/src/DataStructures.java +++ b/DataStructuresAlgorithms/src/DataStructures.java @@ -3,73 +3,7 @@ public class DataStructures { public static void main(String args[]) throws Exception{ - /*HashTable h = new HashTable(1); - h.hash(1, 1); - h.hash(2, 4); - h.hash(3, 9); - System.out.println(h.get(1) + " " + h.get(2) + " " + h.get(3) + " " + h.get(5));*/ - - /*String[] word_list = {"my", "name", "is", "elikem"}; - StringBuilder sentence = new StringBuilder(); - for(String w: word_list){ - sentence.append(w); - } - System.out.println(sentence.changeToString());*/ - - /*mArrayList arr = new mArrayList(); - System.out.println(" size: " + arr.arr_size()); - arr.add(1); - System.out.println(arr.find(1) + " size: " + arr.arr_size()); - arr.add(3); - System.out.println(arr.find(3) + " size: " + arr.arr_size()); - arr.add(-1); - System.out.println(arr.find(-1) + " size: " + arr.arr_size()); - System.out.println(arr.get(0) + " " + arr.get(1) + " " + arr.get(2)); */ - - /*MyStack stack = new MyStack(); - stack.push(5); - stack.push(4); - stack.push(3); - System.out.println(stack.pop() + " " + stack.pop() + " " + stack.pop()); */ - - - /*MyQueue queue = new MyQueue(); - queue.add("my"); - queue.add("name"); - queue.add("elikem"); - System.out.println(queue.remove() + " " + queue.remove() + " " + queue.remove());*/ - - /*TreeNode t = new TreeNode(3); - t.add(4); - t.add(5); - t.add(8); - t.add(9); - - postOrderTrav(t); */ - - /* - int[] arr = {1,2,4,3,5,6,7}; - bubbleSort(arr); - printarr("bubblesort",arr); - int[] arr2 = {1,2,3,4,5,6,7}; - selectionSort(arr2); - printarr("selectionsort", arr2); - int[] arr3 = {1,2,3,4,5,6,7,8}; - mergeSort(arr3); - printarr("mergesort", arr3); - int[] arr4 = {7,3,5,8,5,1}; - quicksort(arr4); - printarr("quicksort",arr4); - int[] arr5 = {10, 11, 9, 8, 100, 250}; - radixsort(arr5, 3); - printarr("radixsort", arr5); - - //int[] search_arr = {}; - //System.out.println(binarysearch(search_arr,1)); - - //int[] search_arr = {-1,0,3,5,7,8}; - //System.out.println(binarySearchRecursive(search_arr, 2));*/ - + } /*Prints the elements in an array*/