Skip to content

Commit

Permalink
improve binary search bisecting expression
Browse files Browse the repository at this point in the history
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
  • Loading branch information
kaushalmahi12 committed Feb 17, 2025
1 parent 630a3ee commit 3f98f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private String findLongestMatchingPrefix(String key) {
int high = key.length() - 1;

while (low < high) {
int mid = low + (high - low + 1) / 2;
int mid = (high + low + 1) / 2;
/**
* This operation has O(1) complexity because prefixMap returns only the iterator
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* compatible open source license.
*/

package org.opensearch.plugin.wlm.rule.storage;
/**
* This package contains interfaces and implementations for in memory rule storage mechanisms
*/
package org.opensearch.plugin.wlm.rule.storage;

0 comments on commit 3f98f9d

Please sign in to comment.