The challenge explanation was really clear but I just want to know why does x have to be less than or equal to y?
-
The Blade Dancer M0★ M1★ M2★ M3★ M4 M5last edited by debbie Jun 4, 2020, 1:59 AM Jun 4, 2020, 1:11 AM
Module 2 Week 4 Day 14 Challenge Part 3
The challenge explanation was really clear but I just want to know why does x have to be less than or equal to y?
-
@The-Darkin-Blade Good question! It's just for organizational purposes, actually. We want to sort the different ways that we are trying by setting to be the shortest side.
If we didn't have this requirement of then we might have and as side lengths on our list of things to check in addition to side lengths and which are really the same combination.
So, in a nutshell, this requirement ensures that we cover all the cases without doing any of the cases twice!