Let's write a new class called int_map which:
1 Is an associative map of int -> int
2 Has a size specified at construction, and all mappings from 0 to size-1 initialized to the same specified value
3 Supports get/set of individual mappings
Let's keep the interface simple:
class int_map
{
... member variables ...
public:
int_map(int num_values, int initial_val);
}
};
Can you write a more efficient version of rle_int_map::get()?
Problem 3: Provide a correct implementation of rle_int_map::set().第一问应该就是简单的hashtable。
欢迎大家讨论下 第二问第三问什么意思? rle_int_map 是个什么 求解释 那个run struct到底是做什么的?