11.1 有效括号(栈的实际应用)


11.2 删除相邻重复元素


补充知识点:用字符串模拟栈
stringbuffer和string builder均可以用来模拟栈,但是stringbuffer是线程安全的,其常用的方法

11.3 逆波兰表达式

java栈与队列的常用的方法总结

Stack stack = new Stack()
Deque<> stack = new LinkedList<>()
Deque<> stack = new ArrayDeque();






stringbuffer和string builder均可以用来模拟栈,但是stringbuffer是线程安全的,其常用的方法




Stack stack = new Stack()
Deque<> stack = new LinkedList<>()
Deque<> stack = new ArrayDeque();


891
707
202
882

被折叠的 条评论
为什么被折叠?