Pergunta de entrevista da empresa LiveRamp

Find the shorted path in a graph The time complexity and space complexity and how to improve it