Here is the 15 sec coding test I used to instantly filter out most applicants

https://josezarazua.com/im-a-former-cto-here-is-the-15-sec-coding-test-i-used-to-instantly-filter-out-50-of-unqualified-applicants/

Comments

21 points · 6 comments · view on lemmy.world

6 Comments

fubarx@lemmy.world · 5 pts · 256d

I read external websites in "Reader Mode." This is what it showed. Was mystified what the hell he was going on about.

amateurcrastinator@lemmy.world · 1 pts · 256d (1 reply)

I am not a coder. How does that equal to 1? That for to me reads x in 3 to 5 in steps of 3 so that will only take 3 and that's it. That means it will be on the else branch of the if and since result is 0 initially then it becomes 3. For exits and that is that. What am I missing?

anomnom@sh.itjust.works · 5 pts · 256d

The for loop is stepping through an array: 3,3,5

So it’s really just 3+3-5=1

I’ve never used a for look that way though, but if the array object supports it in that language then it should work.

amateurcrastinator@lemmy.world · 1 pts · 256d (2 replies)

Ah that makes sense. I have never seen a for loop like that. I only used for in bash, python and fortran and they didn't look like that.

I wonder if for these questions you can ask for clarifications or that's an instant fail. Are you supposed to instantly recognize what they mean? Like with this example what would you have done?

catarina@lemmy.dbzer0.com · 2 pts · 256d (1 reply)

That's Python, by the way. Instead of having to use an index, 'x' is already the element of the list corresponding to each iteration.

amateurcrastinator@lemmy.world · 1 pts · 256d

With python I have the least experience. Well I learned something! Cheers