File tree 1 file changed +4
-4
lines changed
binsort lab starter code.zip_expanded 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public Stack getSorted() {
29
29
public void sort ()
30
30
{
31
31
32
- int firstCheckIndex = wordSz - 1 ; //get the charAt value you should check first
32
+ final int firstCheckIndex = wordSz - 1 ; //get the charAt value you should check first
33
33
final int AlphaAsciiDiff = 97 ; //constant for converting between ASCII and the alphabet
34
34
for (String str : theData ) //start the sort by putting items from array to master stack and unsorted stack
35
35
{
@@ -41,9 +41,9 @@ public void sort()
41
41
{
42
42
for (int i = 0 ; i < dataSz ; i ++) //put all words into their respective bins
43
43
{
44
- String string = master .pop ();
45
- char character = (string ).charAt (charAtVal );
46
- bin [(int )(character ) - AlphaAsciiDiff ].push (string );
44
+ String word = master .pop ();
45
+ char letter = (word ).charAt (charAtVal );
46
+ bin [(int )(letter ) - AlphaAsciiDiff ].push (word );
47
47
48
48
}
49
49
for (int i = 25 ; i >= 0 ; i --) //loop through all the bins from right to left
You can’t perform that action at this time.
0 commit comments