Solution Review: Juggling Values

Discussion on the solution to the problem "Juggling Values" in this lesson.

We'll cover the following

Solution

The solution to this problem relies on copying the value of at least one variable into another temporary variable. After that, we can start mutating variables. The illustration below shows what happens if you approach this problem naively.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy