Longest Absolute Path File – Solved

I looked at the following LeetCode challenge:  https://leetcode.com/problems/longest-absolute-file-path/?tab=Description

Typically I write my test code using the Scanner class. Initially this time was no exception. I did notice that the input contained the strings “\n” and “\t” but I just went ahead. Processing of input created some side effects which I documented in a previous post with this same title. The approach which I will start using from now on was to place the input in an array of Strings and traverse it. This is illustrated in the following Java test code: Continue reading “Longest Absolute Path File – Solved”