Thanks for the article. This is a good lesson on algorithm thinking and building. However, the wording in the next phrase confused me a bit:
...we return the first list without that number and, if the opposite is true, we return the second list without its smallest number...
What it is returning is the smallest number found from the two lists/arrays (the iteratedNum variable would then hold this number), and at the same time modifying the original array to not have that number anymore.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the article. This is a good lesson on algorithm thinking and building. However, the wording in the next phrase confused me a bit:
...we return the first list without that number and, if the opposite is true, we return the second list without its smallest number...
What it is returning is the smallest number found from the two lists/arrays (the iteratedNum variable would then hold this number), and at the same time modifying the original array to not have that number anymore.