rathin91
BAN USER
Questions (3)
Comments (1)
Reputation 50
- 1of 1 vote
AnswersTurtle is on a N * N grid, with N obstacles. The turtle can only move F orward one position
- rathin91 in India
and can turn L eft or R ight. The grid has 4 directions N, E, W, S
Assuming that the initial position of turtle is 1, 1 (bottom left corner of the grid facing North) and
the grid has random obstacles in a few of its cells, given the movement instructions, find the
final position of turtle and printing the grid state will be an added plus. When there is an
obstacle, movement is not possible.
input :
FFFRRFLF
output:
2,3 E| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer - 0of 0 votes
AnswersWhat are references in C++? Why do you need them when you have pointers?
- rathin91 in United States| Report Duplicate | Flag | PURGE
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
big thanks shondik :)
- rathin91 July 25, 2012