Top "Cycle" questions

A cycle is a process or series of items, which repeats several times.

Cycles in family tree software

I am the developer of some family tree software (written in C++ and Qt). I had no problems until one …

c++ graph cycle assertions family-tree
Explain how finding cycle start node in cycle linked list work?

I understand that Tortoise and Hare's meeting concludes the existence of loop, but how does moving tortoise to beginning of …

algorithm linked-list cycle floyd-cycle-finding
Detecting cycles in a graph using DFS: 2 different approaches and what's the difference

Note that a graph is represented as an adjacency list. I've heard of 2 approaches to find a cycle in a …

graph cycle depth-first-search adjacency-list
Perl - while (<>) file handling

A simple program with while( <> ) handles files given as arguments (./program 1.file 2.file 3.file) and standard input of …

perl while-loop cycle filehandle
How to determine if a linked list has a cycle using only two memory locations

Does anyone know of an algorithm to find if a linked list loops on itself using only two variables to …

algorithm loops linked-list cycle
Finding all cycles in undirected graphs

I need a working algorithm for finding all simple cycles in an undirected graph. I know the cost can be …

graph cycle
Jackson - serialization of entities with birectional relationships (avoiding cycles)

I have two entities: Parent { Child[] children; } and Child { Parent parent; } I'm aware about @JsonBackReference and @JsonManagedReference. They are good, …

java json jackson cycle bidirectional-relation
"While" and "repeat" loops in Twig

Are there any nice ways to use while and repeat loops in Twig? It is such a simple task, but …

php symfony loops twig cycle
How can I find the number of Hamiltonian cycles in a complete undirected graph?

Can someone explain how to find the number of Hamiltonian cycles in a complete undirected graph? Wikipedia says that the …

algorithm graph cycle
How to break outer cycle in Ruby?

In Perl, there is an ability to break an outer cycle like this: AAA: for my $stuff (@otherstuff) { for my $…

ruby loops cycle