Skip to content

Commit 5421cfc

Browse files
fix: add <cstdint> to treap.cpp
1 parent 82cb276 commit 5421cfc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

data_structures/treap.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <array> /// For array
2121
#include <cassert> /// For assert
22+
#include <cstdint> /// for integral typedefs
2223
#include <iostream> /// For IO operations
2324

2425
/**
@@ -157,11 +158,9 @@ struct Treap {
157158
}
158159
if (k == key[x]) {
159160
return size[childs[x][0]] + 1;
160-
}
161-
else if (k < key[x]) {
161+
} else if (k < key[x]) {
162162
return _get_rank(childs[x][0], k);
163-
}
164-
else {
163+
} else {
165164
return size[childs[x][0]] + cnt[x] + _get_rank(childs[x][1], k);
166165
}
167166
}

0 commit comments

Comments
 (0)