Pergunta de entrevista da empresa Block

Write a function to validate a URL and handle parsing paths with /../. The interviewer was terrible and never said what constituted a valid URL for the scope of the problem, so ended up wasting a bunch of time on that.