learn-co-curriculum/phase-1-algorithms-big-o-examples

Description/Explanation is Backwards

Closed this issue · 1 comments

Canvas Link

https://learning.flatironschool.com/courses/4978/pages/big-o-examples?module_item_id=362241

Concern

The bit that writes out the sock code to split it in the middle states that if the current item is before the sock we're looking for, we want to look through the first part of the array. If the item is before the sock, anything before the item (the first part of the array) is irrelevant. I feel that it should say "check the second half of the pile" instead of the "first half of the pile" and then the otherwise, should be "check the first half of the pile" if the current item is after the sock we're looking for.
Screen Shot 2022-04-08 at 5 21 30 PM

Additional Context

No response

Suggested Changes

Reverse the if and otherwise statements so it reads more clearly. Thank you

Thanks for the tip! This is fixed in master now.

-Ben