Skip to content

Commit 0fc2247

Browse files
Ändrat i kommentarerna i WarehouseAnalyzer
1 parent 4b73cb9 commit 0fc2247

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/example/WarehouseAnalyzer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ private static double calculateQuantileValue(List<Double> sortedPrices, double q
195195
final int n = sortedPrices.size();
196196

197197
// Calculate the 0-based integer index.
198-
// We subtract 1 because the formula (n+1)*p is 1-based,
199-
// while Java lists are 0-based.
198+
200199
int lowerIndex = (int) Math.floor(qIndex);
201200

202201
// Check 1: If the calculated index falls before the start of the list (lowerIndex < 0),

0 commit comments

Comments
 (0)