From ae7aba0b4483deff74b623fb229f43008aec0dd3 Mon Sep 17 00:00:00 2001 From: KylerSmith Date: Sun, 9 Jul 2017 16:29:00 -0700 Subject: [PATCH] File clean-up --- .DS_Store | Bin 8196 -> 8196 bytes .../DecimalToOctal.java | 0 CountChar.java => Misc/CountChar.java | 0 Dijkshtra.java => Misc/Dijkshtra.java | 0 Factorial.java => Misc/Factorial.java | 0 FindingPrimes.java => Misc/FindingPrimes.java | 0 ReverseString.java => Misc/ReverseString.java | 0 countwords.java => Misc/countwords.java | 0 ft.java => Misc/ft.java | 0 krishnamurthy.java => Misc/krishnamurthy.java | 0 .../removeDuplicateFromString.java | 0 data_structures/{ => Graphs}/Graphs.java | 0 bfs.java => data_structures/Graphs/bfs.java | 28 +++++++++--------- dfs.java => data_structures/Graphs/dfs.java | 0 .../{ => Lists}/CircleLinkedList.java | 0 .../{ => Lists}/DoublyLinkedList.java | 0 .../{ => Lists}/SinglyLinkedList.java | 0 .../{ => Queues}/PriorityQueues.java | 0 data_structures/{ => Queues}/Queues.java | 0 data_structures/{ => Stacks}/Stacks.java | 0 data_structures/{ => Trees}/AVLTree.java | 0 21 files changed, 14 insertions(+), 14 deletions(-) rename DecimalToOctal.java => Conversions/DecimalToOctal.java (100%) rename CountChar.java => Misc/CountChar.java (100%) rename Dijkshtra.java => Misc/Dijkshtra.java (100%) rename Factorial.java => Misc/Factorial.java (100%) rename FindingPrimes.java => Misc/FindingPrimes.java (100%) rename ReverseString.java => Misc/ReverseString.java (100%) rename countwords.java => Misc/countwords.java (100%) rename ft.java => Misc/ft.java (100%) rename krishnamurthy.java => Misc/krishnamurthy.java (100%) rename removeDuplicateFromString.java => Misc/removeDuplicateFromString.java (100%) rename data_structures/{ => Graphs}/Graphs.java (100%) rename bfs.java => data_structures/Graphs/bfs.java (85%) rename dfs.java => data_structures/Graphs/dfs.java (100%) rename data_structures/{ => Lists}/CircleLinkedList.java (100%) rename data_structures/{ => Lists}/DoublyLinkedList.java (100%) rename data_structures/{ => Lists}/SinglyLinkedList.java (100%) rename data_structures/{ => Queues}/PriorityQueues.java (100%) rename data_structures/{ => Queues}/Queues.java (100%) rename data_structures/{ => Stacks}/Stacks.java (100%) rename data_structures/{ => Trees}/AVLTree.java (100%) diff --git a/.DS_Store b/.DS_Store index f28585d78e4c824a62c4e8ee30d752891efb7b22..08cfaf755976285dd6706dd9a6835e8362d21b2b 100644 GIT binary patch delta 869 zcmbVK&ubG=5T4hjW~;{RCfPJp!O$SKG>4Q`1A@3o3mQcdni3KkZL^z~WN~-jc6Za7 z#+V#>5Kq^uA6Z&h;z2Nc_+sv&}T>Wb(TWSrXUE>upq=*(Qq>!k43{* zglnx9!^~Y;xslq|8vD)1ttYP?k-LcAQ1+5D?W_GC`-N|zt;oBEq!Nh^+La7dvFupv z8_S}pY1hmtH#2+s%vsMlFU$G-T!7jNSIbEq(*v^mD zg`S;k5>?F*OR*KA7m9s*8*3@OLa1eLgtXCvtQTi#4k{KRg93nI(S}ZROu@|HEh63>f($G} z0=tluy6{19PJ`F6!LjFV9@3^k>~*@CY4tK6c%q-!5Uy=OnFvlKSum3M%I@ literal 8196 zcmeHM-A)rh6h6a`Y(oSBCU9l;#>5LkAVdilQDFL7Yiu&g|~_&YAtr{Pb*zNR-;{8qpFFS*R@MrqTSS z@N=$1WlY~;umGOu4LNj7&Q1{3hP2HM!+>GHFkl!k3>XHk0s}a+xmY>pzItj}!+>Gn zzhr>-2OE`TQOmxPa_c}NQvk>b+?EA>#czu+q`N++w%8zP`R}Z`|uG+uhAgbnkDj^?H`IcxUb5&SCT9efLA}KYk6N4GGqYj_UVW_Nw}@&(#?{I5MGrFTdWIfjq&y3FHu-YYdE;ci z=@~H(tdDu@%C=6s(n6Ex(kTA}@45gR0eqjp%Dx^!NOj!vV50`0$m zNbaF!_&mbf`FKZORUUYV@vKP|8A0Z?o;Mm^o0&J-gN3ub+4~b4LmXN_c^FHK5jD`u zaLy;fK=db}&vPcpYBE=On%8ufNO6(b5kSS2D&uN2OPv32=YRjdQe!rQF$@?6E|&o@ zQLdCruzB`_Hfx@9Z5#Cvl?&_jm6Q-PG98DM={V&1ABO1LP-RR}%f6DhgYx%31Y}N2 QbN-V#|1UA~`$x|IpZ9>FN&o-= diff --git a/DecimalToOctal.java b/Conversions/DecimalToOctal.java similarity index 100% rename from DecimalToOctal.java rename to Conversions/DecimalToOctal.java diff --git a/CountChar.java b/Misc/CountChar.java similarity index 100% rename from CountChar.java rename to Misc/CountChar.java diff --git a/Dijkshtra.java b/Misc/Dijkshtra.java similarity index 100% rename from Dijkshtra.java rename to Misc/Dijkshtra.java diff --git a/Factorial.java b/Misc/Factorial.java similarity index 100% rename from Factorial.java rename to Misc/Factorial.java diff --git a/FindingPrimes.java b/Misc/FindingPrimes.java similarity index 100% rename from FindingPrimes.java rename to Misc/FindingPrimes.java diff --git a/ReverseString.java b/Misc/ReverseString.java similarity index 100% rename from ReverseString.java rename to Misc/ReverseString.java diff --git a/countwords.java b/Misc/countwords.java similarity index 100% rename from countwords.java rename to Misc/countwords.java diff --git a/ft.java b/Misc/ft.java similarity index 100% rename from ft.java rename to Misc/ft.java diff --git a/krishnamurthy.java b/Misc/krishnamurthy.java similarity index 100% rename from krishnamurthy.java rename to Misc/krishnamurthy.java diff --git a/removeDuplicateFromString.java b/Misc/removeDuplicateFromString.java similarity index 100% rename from removeDuplicateFromString.java rename to Misc/removeDuplicateFromString.java diff --git a/data_structures/Graphs.java b/data_structures/Graphs/Graphs.java similarity index 100% rename from data_structures/Graphs.java rename to data_structures/Graphs/Graphs.java diff --git a/bfs.java b/data_structures/Graphs/bfs.java similarity index 85% rename from bfs.java rename to data_structures/Graphs/bfs.java index 90ff4eca8..4f3bd62d3 100644 --- a/bfs.java +++ b/data_structures/Graphs/bfs.java @@ -2,27 +2,27 @@ import java.util.*; /** * Implementation of a Breadth First Search - * + * * @author Unknown * */ public class bfs{ - + /** - * The BFS implemented in code to use. - * - * @param a Structure to perform the search on + * The BFS implemented in code to use. + * + * @param a Structure to perform the search on a graph, adjacency matrix etc. * @param vertices The vertices to use * @param source The Source */ public static void bfsImplement(byte [][] a,int vertices,int source){ //passing adjacency matrix and no of vertices byte []b=new byte[vertices]; //flag container containing status of each vertices Arrays.fill(b,(byte)-1); //status initialization - /* code status + /* code status -1 = ready 0 = waiting 1 = processed */ - + Stack st = new Stack(vertices); //operational stack st.push(source); //assigning source while(!st.isEmpty()){ @@ -30,18 +30,18 @@ public class bfs{ System.out.println(st.peek()); int pop=st.peek(); b[pop]=(byte)1; //assigning processed status - st.pop(); //removing head of the queue + st.pop(); //removing head of the queue for(int i=0;i