Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Takes in directions as input and tells you where the robot is ultimately pointed at.

Notifications You must be signed in to change notification settings

adityasrini/RobotCodingInterview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Coding Interview Solution

A few months back, I had a coding interview with a company in the Dulles Corridor of the DC Metro Area. I was asked to code a robot that could turn directions based on an input of a series of R's and L's and print out what direction it was pointing towards. As someone who hadn't done a lot of hard coding and thus hadn't had his algorithmic thinking honed in yet, I took about 40-50 mins to come up with what I had in the WhatIDidInTheInterview package! It was a disaster!

The folks who interviewed me were nice enough to tolerate this and encourage me to solve more problems and learn Java fundamentals more thoroughly. I took their advice to heart and spent the next few months off the job seeking process and on docs.oracle.com.

Out of curiosity I returned to solve the problem posed in the coding interview again. The interviewers told me that an experienced programmer would have come up with a solution within 10 minutes. This time, armed with a broader knowledge of Java 8, and having solved problems in Project Euler and Reddit's r/DailyProgrammer, I got the whole solution done in 5 minutes.

Suffice to say, I have come a long way and I'm proud of that! The package FixedSolution has my solution that takes in any combination and number of letters and responds to either capital or lowercase r's and l's and prints out the final pointing direction of the robot.

About

Takes in directions as input and tells you where the robot is ultimately pointed at.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages