From 1b6e26be2bf4f2dd584b3b59e4781a9d79cd4b48 Mon Sep 17 00:00:00 2001 From: Yuhao Ju Date: Sat, 1 Apr 2023 12:45:02 +0800 Subject: [PATCH] =?UTF-8?q?update=200225.=E7=94=A8=E9=98=9F=E5=88=97?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=A0=88=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=A4=8D?= =?UTF-8?q?=E6=9D=82=E5=BA=A6=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0225.用队列实现栈.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/problems/0225.用队列实现栈.md b/problems/0225.用队列实现栈.md index 16b9e47c..bad2faec 100644 --- a/problems/0225.用队列实现栈.md +++ b/problems/0225.用队列实现栈.md @@ -111,6 +111,8 @@ public: } }; ``` +* 时间复杂度: push为O(n),其他为O(1) +* 空间复杂度: O(n) # 优化 @@ -156,6 +158,9 @@ public: } }; ``` +* 时间复杂度: push为O(n),其他为O(1) +* 空间复杂度: O(n) + # 其他语言版本