From 5cbbb103d1c196a98facdf5b65c94e3318840eca Mon Sep 17 00:00:00 2001 From: Jay-prakashpandey <81908427+Jay-prakashpandey@users.noreply.github.com> Date: Mon, 4 Oct 2021 12:40:49 +0530 Subject: [PATCH] Update stack.md --- contents/algorithms/stack.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contents/algorithms/stack.md b/contents/algorithms/stack.md index 8262a74c..b3dddccd 100644 --- a/contents/algorithms/stack.md +++ b/contents/algorithms/stack.md @@ -11,3 +11,8 @@ title: Stack - E.g. `{ac[bb]}`, `[dklf(df(kl))d]{}` and `{[[[]]]}` are matched. But `{3234[fd` and `{df][d}` are not. - [Source](http://blog.gainlo.co/index.php/2016/09/30/uber-interview-question-delimiter-matching/) - Sort a stack in ascending order using an additional stack. + +## Complexity + +- Access , Search O(N) +- Insertion , Deletion O(1)