update 0225.用队列实现栈:添加复杂度分析

This commit is contained in:
Yuhao Ju
2023-04-01 12:45:02 +08:00
committed by GitHub
parent 02f9c26f69
commit 1b6e26be2b

View File

@ -111,6 +111,8 @@ public:
}
};
```
* 时间复杂度: push为O(n)其他为O(1)
* 空间复杂度: O(n)
# 优化
@ -156,6 +158,9 @@ public:
}
};
```
* 时间复杂度: push为O(n)其他为O(1)
* 空间复杂度: O(n)
# 其他语言版本