s*******e 发帖数: 27 | 1 I got an IB screening written test(not onsite) a while ago and it had an
interesting question.
It shouldn't take more than 60 mins.
I'd like to know where I stand so I will only post the answer if necessary
after few people have tried. The answer should be self explanatory once you
got it.
Please try it and post how long it takes you to solve it.
Thanks. |
s*******r 发帖数: 63 | 2 what about this:
zero(r1);
zero(r2);
inc(r2);
loop(r4){
inc(r1);
loop(r2){zero(r1);}
zero(r2);} |
s*******e 发帖数: 27 | 3 Great. It's more efficent than my solution and faster too.
Now I know why I didn't got the job:-).
【在 s*******r 的大作中提到】 : what about this: : zero(r1); : zero(r2); : inc(r2); : loop(r4){ : inc(r1); : loop(r2){zero(r1);} : zero(r2);}
|
m********0 发帖数: 2717 | 4 60 mins for this one?
Isn't it too long?
necessary
you
supports
【在 s*******e 的大作中提到】 : I got an IB screening written test(not onsite) a while ago and it had an : interesting question. : It shouldn't take more than 60 mins. : I'd like to know where I stand so I will only post the answer if necessary : after few people have tried. The answer should be self explanatory once you : got it. : Please try it and post how long it takes you to solve it. : Thanks.
|
s*******e 发帖数: 27 | 5 I just didn't want to put pressure on anyone.
I guess that I didn't realize how good people here are.
In my circle of friends, there are people who couldn't figure it out.
【在 m********0 的大作中提到】 : 60 mins for this one? : Isn't it too long? : : necessary : you : supports
|
o*****n 发帖数: 2098 | 6 zero(r1)
zero(r2)
loop(r4){
loop(r2){
inc(r1)
zero(r2)
}
inc(r2)
}
?? |
s*******e 发帖数: 27 | 7 It's correct.
Did it take you long?
【在 o*****n 的大作中提到】 : zero(r1) : zero(r2) : loop(r4){ : loop(r2){ : inc(r1) : zero(r2) : } : inc(r2) : } : ??
|