Here is a little mental problem solving exercise for you to try to do in 30 seconds; that was the time I was allowed. So I had a telephone interview from a company today and this guy asked me this question utilizing a parrallel programming algorithm. Here are the details:
Two parachutist (A and B: A is in front of B) land on single line; one behind the other. Their parachutes also lands behind them respectively.
We have a set of instructions which are as follow (all instructions are executed, meaning A and B will executed instructions at the same time).
Question:
We need our parachutist to somehow meet each other, what are the sets of instructions that can make that happen?
Please try to answer before reading my answer below
My answer:
NB I had to change the original questions as the interviewer explanations led to the parachutist to never meet.
Two parachutist (A and B: A is in front of B) land on single line; one behind the other. Their parachutes also lands behind them respectively.
We have a set of instructions which are as follow (all instructions are executed, meaning A and B will executed instructions at the same time).
- move forward 1 step
- move back 1 step
- if standing on a parachute go to (1 | 2)
Question:
We need our parachutist to somehow meet each other, what are the sets of instructions that can make that happen?
Please try to answer before reading my answer below
My answer:
- execute 2
- execute 3
- When both parachutist move back 1 step, they will both be on their parachutes
- when parachutist A stands on his parachute, he will move back 1 step therefore go to 1
- when parachutist B lands on his parachute, he will move forward 1 step
NB I had to change the original questions as the interviewer explanations led to the parachutist to never meet.
I have seen fantastic blogs and I have seen not so fantastic blogs. This blog is very informative in many ways and certainloy ranks in the former category. Really appreciate the information your providing use avid readers!
ReplyDeletehttp://celabright.com/
Both we can better start with forex and after that nadex binary options, learn and only then trade binary options, but i can tell you that before you can use any strategy you have to understand yourself first, how is your mind work, without it you will continue the up and down profit/loss, feeling pressure/calm.
ReplyDeleteMore information please visit our web site :http://www.automatedbinaryoptions.co/?p=180
You made some clear points there. I looked on the internet for the subject matter and found most persons will consent with your blog.
ReplyDeleteamazon best sellers list uk
I conceive you have noted some very interesting points, regards for the post.
ReplyDeleteสล็อตเล่นง่าย แตกไว เว็บไหนดี
This comment has been removed by the author.
ReplyDelete