問題タブ [quadratic-probing]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Python での 2 次プロービングによる文字列ハッシュ
Python で関数を作成しようとしています。この関数は、ハッシュ テーブルに文字列を追加し、数学をインポートせずに 2 次プロービングで衝突を解決します。
私の問題は、 IndexError: list index out of range が発生し続けることです。問題はelseブロックにあると確信していますが、解決策が見つからないようです。助けていただければ幸いです。
algorithm - 二次プロービング関数の証明
誰かがこの問題を解決するのを手伝ってくれたら本当にありがたいです。問題は: 次のハッシュ関数を考えてみましょう: h(k, i) = (h'(k) + (1/2) (i + i^2 )) mod m、ここで m = 2^p (正の整数) p。任意の k について、プローブ シーケンスが <0, 1, 2, ...,m – 1> の順列であることを証明または反証します。