Algorithms Cycle Detection Algorithms A cycle in a data structure as we have already seen is a condition with no end. A few popular cycle detection algorithms are Floyd's cycle detection algorithm and Brent’s Cycle Detection Algorithm.
Data Structures Finding the length of a loop in linked list In this article, we will look at the method of finding the length of a loop in a linked list. For that you should be able to understand Floyd's loop detection algorithm.
Data Structures Detect a loop in a linked list (3 methods) A Loop in a linked list is a condition when a Linked list does not have any end. We have explored different ways to detect loop in a linked list like by marking visited nodes, using hashmap and Floyd's cycle finding algorithm.
Software Engineering Vector::size() in C++ STL Vector::size() in C++ STL is used to get the size of a vector container that is the number of elements it has. We have compared it with empty() and capacity() functions as well which are related.