TCS interview question

The sql query to find 3rd highest salary, using window functions and had to explain the dijkstra algorithm.