From d6c3ca0ae3a26a08d247b6c0f119a45d9ea1b831 Mon Sep 17 00:00:00 2001 From: weiss-ben <90002567+weiss-ben@users.noreply.github.com> Date: Sat, 17 Sep 2022 03:37:24 +0300 Subject: [PATCH] Update search/median_search2.cpp Co-authored-by: David Leal --- search/median_search2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/median_search2.cpp b/search/median_search2.cpp index 0d019af83..5ce865579 100644 --- a/search/median_search2.cpp +++ b/search/median_search2.cpp @@ -2,7 +2,7 @@ * @file * @brief Given a linked list L[0,....,n] of n numbers, find the middle node. * - * @details The technique utilized in this implementation is the "Floyd's tortise and hare" approach. Wikipedia link to technique: https://en.wikipedia.org/wiki/Cycle_detection#Floyd's_tortoise_and_hare + * @details The technique utilized in this implementation is the ["Floyd's tortoise and hare"](https://en.wikipedia.org/wiki/Cycle_detection#Floyd's_tortoise_and_hare) approach. * This technique uses two pointers that iterate through the list at different 'speeds' in order to solve problems. * In this implementation, for every iteration the slow pointer advances one node while the fast pointer advances two nodes. * The result of this is that since the fast pointer moves twice as fast as the slow pointer, when the fast pointer reaches the end of the list