From 8c1957e600cff896b2a673d7ba8dbcaa132b37e5 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 26 Sep 2016 05:08:30 +0100 Subject: Fix comment. Thinking about it more carefully, this algorithm is always O(n^2). --- content_scripts/link_hints.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index cf8d40c0..b4b63b1f 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -339,8 +339,7 @@ class LinkHintsMode # Fill in the markers' rects, if necessary. marker.markerRect ?= marker.getClientRects()[0] for marker in localHintMarkers - # Calculate the overlapping groups of hints. This is O(n^2) in the best case and O(n^3) in the worst - # case. + # Calculate the overlapping groups of hints. We call each group a "stack". This is O(n^2). stacks = [] for marker in localHintMarkers stackForThisMarker = null -- cgit v1.2.3