Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CyC2018 committed Nov 3, 2020
1 parent c29021b commit 4b11ab5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions docs/notes/31. 栈的压入、弹出序列.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 31. 栈的压入、弹出序列

[NowCoder](https://www.nowcoder.com/practice/d77d11405cc7470d82554cb392585106?tpId=13&tqId=11174&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目链接

[牛客网](https://www.nowcoder.com/practice/d77d11405cc7470d82554cb392585106?tpId=13&tqId=11174&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)

## 题目描述

Expand All @@ -10,7 +12,7 @@

## 解题思路

使用个栈来模拟压入弹出操作。
使用个栈来模拟压入弹出操作。每次入栈个元素后,都要判断下栈顶元素是不是当前出栈序列 popSequence 的第个元素,如果是的话则执行出栈操作并将 popSequence 往后移位,继续进行判断。

```java
public boolean IsPopOrder(int[] pushSequence, int[] popSequence) {
Expand All @@ -33,4 +35,5 @@ public boolean IsPopOrder(int[] pushSequence, int[] popSequence) {




<div align="center"><img width="320px" src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/githubio/公众号二维码-2.png"></img></div>
7 changes: 5 additions & 2 deletions notes/31. 栈的压入、弹出序列.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 31. 栈的压入、弹出序列

[NowCoder](https://www.nowcoder.com/practice/d77d11405cc7470d82554cb392585106?tpId=13&tqId=11174&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)
## 题目链接

[牛客网](https://www.nowcoder.com/practice/d77d11405cc7470d82554cb392585106?tpId=13&tqId=11174&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github)

## 题目描述

Expand All @@ -10,7 +12,7 @@

## 解题思路

使用个栈来模拟压入弹出操作。
使用个栈来模拟压入弹出操作。每次入栈个元素后,都要判断下栈顶元素是不是当前出栈序列 popSequence 的第个元素,如果是的话则执行出栈操作并将 popSequence 往后移位,继续进行判断。

```java
public boolean IsPopOrder(int[] pushSequence, int[] popSequence) {
Expand All @@ -33,4 +35,5 @@ public boolean IsPopOrder(int[] pushSequence, int[] popSequence) {




<div align="center"><img width="320px" src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/githubio/公众号二维码-2.png"></img></div>

0 comments on commit 4b11ab5

Please sign in to comment.