Skip to content

Commit

Permalink
Merge pull request #70 from junnengsoo/main
Browse files Browse the repository at this point in the history
style: Resolve test stylechecks
  • Loading branch information
4ndrelim authored Jan 23, 2024
2 parents 6c0fc7e + 572dad4 commit 55f3046
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Due to the nature of floor division in Java's \ operator, if there are two mid-v
when the number of elements is even, the first mid-value will be selected. Suppose we do not increment the low pointer
during reassignment, `low = mid`, let us take a look at the following example:

![binary search templated 1 img](../../../../../docs/assets/images/BinarySearchTemplated3.jpeg)
![binary search templated 1 img](../../../../../../docs/assets/images/BinarySearchTemplated3.jpeg)

The search space has been narrowed down to the range of index 1 (low) to 2 (high). The mid-value is calculated,
`mid = (1 + 2) / 2`, to be 1 due to floor division. Since `2 < 5`, we enter the else block where there is reassignment
Expand Down
7 changes: 4 additions & 3 deletions src/test/java/algorithms/binarySearch/BinarySearchTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package algorithms.binarySearch;

import algorithms.binarySearch.binarySearch.BinarySearch;
import algorithms.binarySearch.binarySearchTemplated.BinarySearchTemplated;
import static org.junit.Assert.assertEquals;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import algorithms.binarySearch.binarySearch.BinarySearch;
import algorithms.binarySearch.binarySearchTemplated.BinarySearchTemplated;

public class BinarySearchTest {
@Test
Expand Down

0 comments on commit 55f3046

Please sign in to comment.