3 ms·
in Lisp you use two pointers (a fast and a slow one) to detect a cycle in a linked list. For example http://clhs.lisp.se/Body/f_list_l.htm http://clhs.lisp.se/B
by piedradura 10y ago
in Lisp you use two pointers (a fast and a slow one) to detect a cycle in a linked list. For example http://clhs.lisp.se/Body/f_list_l.htm http://clhs.lisp.se/Body/f_list_l.htm