Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 86f0c91

Browse files
committed
DOCS Added docs to printIntArray method and other refactoring
1 parent e737dc5 commit 86f0c91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/PracticeAlgorithms.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public static void printTwoDmIntArray(int[][] theArray) {
9494
}
9595

9696

97+
/**
98+
* static method to print the formatted contents of an int array
99+
* */
97100
public static void printIntArray(int[] theArray) {
98101
for (int item : theArray) {
99102
System.out.printf("%d ", item);
@@ -140,6 +143,7 @@ public static long fact(int N) {
140143
return N * fact(N - 1);
141144
}
142145

146+
143147
/**
144148
* static method that calls rank to binary search for "key"
145149
* */
@@ -164,6 +168,7 @@ private static int rank(int key, int[] array, int minIndex, int maxIndex) {
164168
return rank(key, array, minIndex, maxIndex - 1);
165169
}
166170

171+
167172
/**
168173
* static method to brute force search for a "key" in an int array
169174
* */

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /