← 返回 meta 的题目列表Calculate the Destination Path
类型:online_judge
Given a current path representing the current working directory, and a cd path that represents a path to move to, devise an algorithm to calculate the resulting final path. The cd path can be a relative path or an absolute path.
Example
Input
/home/user
cd /usr/bin