You must log in or register to comment.
case
You could’ve used an actual switch but you chose a USB hub instead
I think the foreach one should have been recursion.
Nope recursion would be a bigger cable connected to same cable only smaller, connected to the same cable only smaller, etc…
If this is how your recursion looks like you have a problem and you need to rethink your recursion step and and stop condition :)
I disagree. Recursion is the same thing over and over again until the exit condition. Nothing is getting smaller except the remaining entries.
Of course it does, I suggest you go read about recursion. Here’s a link: https://www.cs.odu.edu/~toida/nerzic/content/recursive_alg/rec_alg.html
Good luck