私の質問は次のとおりです。
トリプルのリストが与えられ、それらは hash_heap と呼ばれるデータ構造に格納されます (名前についてはわかりませんが、ハッシュテーブルとヒープが混在している必要があります)。そして、データ構造が次のメソッドを提供することを願っています。
index_by_first_col(key) // the method could help find the a triple stored in it by matching the first column. It expects the searching is running at constant time
get_min_by_third_col() // the method get the minimum triple sort according to the third column, it is also expects the method is running at constant time.
insert_new_elt(triple) // add new trip, running at constant time
このようなデータ構造を実装することは可能ですか? ハッシュテーブルが最初の方法をサポートし、ヒープが 2 番目と 3 番目の方法をサポートできることは知っていますが、それらを組み合わせる方法がわかりません。何か案は?
ありがとう!