Skip to content

Commit 48e3733

Browse files
committed
Recursion
1 parent 33d8846 commit 48e3733

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

recursion/RecursionFun.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@
1010
*
1111
*/
1212
public class RecursionFun {
13-
14-
/**
15-
* Finds the index of a value of interest within a sorted integer array using
16-
* binary search in a recursive manner.
17-
*
18-
* @param arr The given sorted integer array
19-
* @param start The index to start the search from (inclusive)
20-
* @param end The index to end the search at (inclusive)
21-
* @param value The value to be searched
22-
* @return The index of the value in the array
23-
* @throws Exception
24-
*/
2513

2614
HashMap<Integer, char[]> telephoneChars = new LinkedHashMap<Integer, char[]>();
2715

@@ -42,8 +30,18 @@ public RecursionFun(){
4230
telephoneChars.put(0, new char[]{'0'});
4331

4432
}
45-
46-
33+
34+
/**
35+
* Finds the index of a value of interest within a sorted integer array using
36+
* binary search in a recursive manner.
37+
*
38+
* @param arr The given sorted integer array
39+
* @param start The index to start the search from (inclusive)
40+
* @param end The index to end the search at (inclusive)
41+
* @param value The value to be searched
42+
* @return The index of the value in the array
43+
* @throws Exception
44+
*/
4745
public int binarySearch(int[] arr, int start, int end, int value) throws Exception{
4846

4947
/**

0 commit comments

Comments
 (0)