Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inline extract() {
- extracting = true;
- if
- :: !empty ->
- atomic {
- pm = m;
- res = a[0];
- m--;
- a[0] = a[m];
- SiftDown(0);
- isHeap();
- find(); // добавил
- }
- extracting = false;
- :: else -> res = -1; skip;
- fi;
- extracting = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement