Dijkstra

Apr
13
2024
0

Biweekly Contest 128 – 3/4

Q1: https://leetcode.com/problems/score-of-a-string/ Q2: https://leetcode.com/problems/minimum-rectangles-to-cover-points/ Notes: The y values don’t matter; only the x values matter. Q3: https://leetcode.com/problems/minimum-time-to-visit-disappearing-nodes/description/ Notes: Use Dijkstra’s...

Feb
23
2024
0

Daily Question – *0787. Cheapest Flights Within K Stops

This is a typical graph theory problem that could be solved by using the Dijkstra algorithm. Since it has a limitation, we could use the SPFA (Shortest Path Faster Algorithm).