vault backup: 2025-03-25 12:57:48
This commit is contained in:
parent
78aa170df9
commit
9e805c5447
1 changed files with 2 additions and 1 deletions
|
@ -158,6 +158,7 @@ push(w) :=
|
|||
conclude(i,v,s)
|
||||
if i=k then
|
||||
return FULL
|
||||
else
|
||||
newtop <- ⟨i+1,w,STACK[i+1].seq_num+1⟩
|
||||
if TOP.compare&set(⟨i,v,s⟩,newtop) then
|
||||
return OK
|
||||
|
@ -172,7 +173,7 @@ pop() :=
|
|||
conclude(i,v,s)
|
||||
if i=0 then
|
||||
return EMPTY
|
||||
newtop <- ⟨i-1,STACK[i-1⟩
|
||||
newtop <- ⟨i-1,STACK[i-1]⟩
|
||||
if TOP.compare&set(⟨i,v,s⟩,newtop) then
|
||||
return v
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue