Mark As Completed Discussion

Objective: In this lesson, we'll cover the Floyd-Warshall Algorithm, and focus on these outcomes:

  • You'll learn what slow and fast pointers are.
  • We'll show you how to use this concept in programming interviews.
  • You'll see how to utilize this concept in challenges.

There are so many different types of problems in computer science. As such, there are plenty of algorithms developed to solve each type of problem. For instance, to search an item in a list, you can use either binary search, linear search, or breadth-first search, among many other possible solutions.

Luckily, for search and other types of problems, we've narrowed the field of solutions used in real-world architectures to just a handful of efficient, proven ones.

In this tutorial, we're going to do a deep dive on one such algorithm. The slow and fast pointers algorithm (also known as Floyd's Cycle Detection algorithm or the Tortoise and Hare algorithm) uses two pointers to determine traits about a graph. It is often used to detect cycles in a linked list.

Introduction

Access all course materials today

The rest of this tutorial's contents are only available for premium members. Please explore your options at the link below.

Returning members can login to stop seeing this.