Skip to content

Commit 5cfab8b

Browse files
committed
cleanup.
1 parent 53532f6 commit 5cfab8b

File tree

1 file changed

+6
-6
lines changed
  • src/CrackingTheCodingInterview/src/Book/Helper/Utility/Java

1 file changed

+6
-6
lines changed

src/CrackingTheCodingInterview/src/Book/Helper/Utility/Java/Utility.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ public static LinkedListNode linkedListWithValue(int N, int value) {
7676
return root;
7777
}
7878

79-
public static LinkedListNode createLinkedListFromArray(int[] vals) {
80-
LinkedListNode head = new LinkedListNode(vals[0], null, null);
79+
public static LinkedListNode createLinkedListFromArray(int[] values) {
80+
LinkedListNode head = new LinkedListNode(values[0], null, null);
8181
LinkedListNode current = head;
82-
for (int i = 1; i < vals.length; i++) {
83-
current = new LinkedListNode(vals[i], null, current);
82+
for (int i = 1; i < values.length; i++) {
83+
current = new LinkedListNode(values[i], null, current);
8484
}
8585
return head;
8686
}
@@ -121,8 +121,8 @@ public static String toBaseNString(int a, int base) {
121121

122122
String s = "";
123123
while (true) {
124-
int lastdigit = a % base;
125-
s = lastdigit + s;
124+
int lastDigit = a % base;
125+
s = lastDigit + s;
126126
a = a / base;
127127
if (a == 0)
128128
break;

0 commit comments

Comments
 (0)