Skip to content

Commit 2331c0d

Browse files
authored
Merge pull request #2 from gulangyuzzz/gulangyuzzz-patch-1-1
Create 孙行者.md
2 parents 31172d9 + e3e4cf5 commit 2331c0d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

2018.11.27-leetcode125/孙行者.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
class Solution{
3+
private:
4+
int top;
5+
char elem[MAXSIZE]
6+
public:
7+
void push_sq(char *arr[],Solution *sq){
8+
for(int i=0;i<arr.length;i++)
9+
pop(sq,arr[i]);
10+
}
11+
int isBoolen(Solution *sq,char *arr[]){
12+
for(int i=0;i<arr.length;i++){
13+
if(arr[i]==pop(sq))
14+
return 1;
15+
else
16+
return 0;
17+
}
18+
}
19+
void init_sq(Solution *sq){
20+
sq->top=0;
21+
}
22+
void push(Solution *sq,char x){
23+
sq->elem[sq->top]=x;
24+
sq->top++;
25+
}
26+
char pop(Solution *sq){
27+
return (sq->eelm[sq->--top]);
28+
}
29+
};
30+

0 commit comments

Comments
 (0)