Skip to content

Commit

Permalink
update post
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-jonghoonpark committed Aug 3, 2024
1 parent 541b7aa commit 18c5181
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion _posts/2024-07-30-leetcode-54.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,11 @@ class Solution {

## TC, SC

n은 matrix의 모든 아이템의 수를 한다고 하였을 때, 시간복잡도는 `O(n)`, 공간복잡도는 `O(1)` 이다. (공간복잡도의 경우 결과를 위해 생성되는 List는 계싼에서 제외함.)
문제에서 다음과 같이 정의 되어 있다.

```
m == matrix.length
n == matrix[i].length
```

시간복잡도는 `O(m * n)`, 공간복잡도는 `O(1)` 이다. (공간복잡도의 경우 결과를 위해 생성되는 List는 계산에서 제외함.)

0 comments on commit 18c5181

Please sign in to comment.