Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path.In a UNIX-style file system, a period . refers to the current directory. Furthermore…
A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the b…