My own answer is binary search tree with next pointer， like this：

```
struct Node{
int key;
Node* left;
Node* right;
Node* next;
Node* parent;
};
typedef struct Node MyNode;
MyNode* myTable;
MyNode* leftNode;
```

am I right, or is there some other answer?

You need a Heap: https://en.wikipedia.org/wiki/Heap_(data_structure)