Subj : Data Structure Problem To : comp.programming From : Joy Date : Mon Aug 08 2005 06:05 am Hi, I have a problem in data structures which most of the people find a homework but that it is and I am sorry for that. i am stuck in this one .Please try to help me , just provide me the outline how to analyse this problem. Question : A man Joe has a habbit of eating pancakes & driving bikes.Once he went for outside by his bike,now he is EXACTLY IN THE MIDDLE OF A ROAD his stomach is crying for pancakes and also his contact lenses are full of dirt.Now HE CANNOT SEE A PANCAKE SHOP UNTILL HE REACH THE PANCAKE SHOP EXACTLY BEFIRE IT. Now please provide me the algorithm for finding the pancake shop which is nearer to JOE & also tell me how can I calculate time and space complexity. Note: Information given as if he goes to the right side it is considered as 1unit,2unit....and son on and if he chooses left then -1unit,-2unit...and so on. II)Second part of the problem says that if Joe wants to flip a coin for ,in which direction(left or right) he has to move. Then what happens to the code/algorithm. left<---- ------>right Example:----------------------=AD--------------------------- Road (Joe)in the middle of the road. ------------------------------=AD-------------------- Thanks=20 Paul. .