Skip to content

Commit 5081e0e

Browse files
committed
Update cheapest-flight-path.md
1 parent e11a57f commit 5081e0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

articles/cheapest-flight-path.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ impl Solution {
381381

382382
### Time & Space Complexity
383383

384-
- Time complexity: $O((n + m) * k)$
385-
- Space complexity: $O(n * k)$
384+
- Time complexity: $O(m \cdot k \cdot \log(n \cdot k))$
385+
- Space complexity: $O(n \cdot k)$
386386

387387
> Where $n$ is the number of cities, $m$ is the number of flights and $k$ is the number of stops.
388388

0 commit comments

Comments
 (0)