#stacks
Read more stories on Hashnode
Articles with this tag
[Problem Link] https://leetcode.com/problems/min-stack/ · //insted of this, we can use two stacks as well class MinState{ int val; int min; ...
[Problem Link] https://leetcode.com/problems/valid-parentheses/ · class Solution { public boolean isValid(String s) { Stack<Character> st =...
[Problem Link] https://leetcode.com/problems/implement-queue-using-stacks/ · class MyQueue { public Stack<Integer> st1; public Stack<Integer>...
[Problem Link] https://leetcode.com/problems/valid-parentheses/ · impl Solution { pub fn is_valid(s: String) -> bool { let mut ans: bool =...