I know this has asked before but I couldn't make anything out of the answers so I hope someone will be able to explain this to me in a really easy way....
The Problem:
A man is standing in front of a wall with an infinite length. On the other side of the wall is a town he's trying to get to. Somewhere in the wall is a gate and the guy can either go left or right to find it.
I need to write an algorithm with a linear runtime and I am just not able to figure this out... Any help is greatly appreciated!