The initial question about path manipulation was both confusingly broad, and too low-level.
Anonymous
Apparently it was sufficient to build a small stack, but it wasn't made clear that efficiency wasn't a concern (as it often is with these kind of trick questions).
Check out your Company Bowl for anonymous work chats.