Function: search (k) return tree_search (k, root); Function: tree_search (k, node) if node is a leaf then return node; switch k do case k ≤ k_0 return tree_search(k, p_0); case k_i < k ≤ k_{i+1} return tree_search(k, p_{i+1}); case k_d < k return tree_search(k, p_{d}); This pseudocode assumes that no duplicates are allowed.
Function: search (k) return tree_search (k, root); Function: tree_search (k, node) if node is a leaf then return node; switch k do case k < k_0 return tree_search(k, p_0); case k_i ≤ k < k_{i+1} return tree_search(k, p_{i+1}); case k_d ≤ k return tree_search(k, p_{d+1}); 이 수도코드는 동일한 키가 존재하지 않는다고 가정한다.