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)