From 7afa77247fbe45fbd6c149da83ac6a91ff5731b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 11 Mar 2013 23:20:50 +0100 Subject: Algorithms-I : 3-Collinear: fix main iteration loop indexes -> 100% --- Algorithms/Part-I/3-Collinear/Fast.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Algorithms/Part-I/3-Collinear/Fast.java b/Algorithms/Part-I/3-Collinear/Fast.java index 60b0d25..9d12eaf 100644 --- a/Algorithms/Part-I/3-Collinear/Fast.java +++ b/Algorithms/Part-I/3-Collinear/Fast.java @@ -52,7 +52,7 @@ public class Fast segments = new ArrayList(); slopes = new HashMap>(); - for (int i = 1, n = N - 1; i < N - 3; i++, n--) + for (int i = 1, n = N - 1; i < N - 2; i++, n--) { // reference [i-1] and copy [i;N[ to [0;n[ ref = pts[i - 1]; -- cgit v1.1-2-g2b99