diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-03-11 23:20:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-11-15 17:38:44 +0100 |
commit | 7afa77247fbe45fbd6c149da83ac6a91ff5731b9 (patch) | |
tree | 8e56e7a5d2ba2027ed3efc7ac3d33e7272daeacb /Algorithms/Part-I | |
parent | 9641e1fb13ecd726473286ed15b4fb316bcc8cf1 (diff) | |
download | coursera-7afa77247fbe45fbd6c149da83ac6a91ff5731b9.zip coursera-7afa77247fbe45fbd6c149da83ac6a91ff5731b9.tar.gz |
Algorithms-I : 3-Collinear: fix main iteration loop indexes -> 100%
Diffstat (limited to 'Algorithms/Part-I')
-rw-r--r-- | Algorithms/Part-I/3-Collinear/Fast.java | 2 |
1 files changed, 1 insertions, 1 deletions
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<Point[]>(); slopes = new HashMap<Double, HashSet<Point>>(); - 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]; |