04/11/2021, 16:24
04/11/2021, 22:47
04/11/2021, 22:54
05/11/2021, 11:36
create two empty pointer p1 and p2
p1 <- L.head
p2 <- L.head.next
while p1 not p2
p1 <- p1.next
p2 <- (p2.next).next
end while
cycle = 1
p1 <- p1.next
p2 <- (p2.next).next
while p1 not p2
p1 <- p1.next
p2 <- (p2.next).next
cycle = cycle + 1
end while
p1 <- L.head
p2 <- L.head
for i = 1 to cycle
p2 <- p2.next
end for
startcycle = 0
while p1 not p2
p1 <- p1.next
p2 <- p2.next
startcycle = startcycle +1
end while
return (startcycle + cycle)
07/11/2021, 22:02
Skuola.net News è una testata giornalistica iscritta al Registro degli Operatori della Comunicazione.
Registrazione: n° 20792 del 23/12/2010.
©2000—
Skuola Network s.r.l. Tutti i diritti riservati. — P.I. 10404470014.
Powered by phpBB © phpBB Group - Privacy policy - Cookie privacy
phpBB Mobile / SEO by Artodia.