Reported interview periodNot available
Normalize an absolute filesystem path
Read one absolute path and return its canonical form: empty segments and . segments disappear, .. folds into the parent, and exactly one slash separates the surviving directories.
Practice focusRequirements - The input is a single absolute path; it may repeat separators and may end with a slash. - A whole segment equal to . is dropped; only a whole segment equal to .. means "go up". - .. removes the most recently kept segment; when nothing is left to remove it has no effect, so climbing past the root stays at the root. - Join the remaining segments with one leading slash, no doubled slashes, and no trailing slash. - Return / alone when no segment survives.…