Interview Bootcamp
Ask Author
Back to course home

0% completed

Vote For New Content
Please, I request the person in charge of the course to fix the first solution p...

Vinicius

Feb 22, 2023

Please, I request the person in charge of the course to fix the first solution proposed, because it is wrong.

BTW, this solution is not represented on the code examples. It tells us to add the bigger square to the array. In fact, as the solution suggests we to iterate from the lowest non-negative number to the right, and from the highest negative number to the left, we must add the smallest square, not the larger one.

Please, fix the text. See attached image. Image

2

0

Comments
Comments
Design Gurus
Design Gurus3 years ago

The proposed solution fills the output array from the end.

This means we have to insert the "bigger" number first.

Inserting "smaller" square won't work.

This gets tricky as we can't insert the "smaller" first (that would be at the beginning of the output array thou...

Design Gurus
Design Gurus3 years ago

Sorry for the previous comment; it is valid only for the second approach.

The first approach does need to append the smaller number. You are correct. We will update this.

V
Vinicius 3 years ago

Thanks for the revision.

Design Gurus
Design Gurus3 years ago

Please check the latest version of the course at designgurus.io, you should have access there. Please use the same email to signup.

We are in the process of moving everyone to the newer version.

V
Vinicius 3 years ago

Thank you. I've just signed in there.