You are given two arrays to find out if they are equal?
One way to solve it is to use a hash table. How can I accomplish this using a hash table?
Use std::array:
std::array
std::array<int, 3> var = {{ 1, 2, 3 }}, bar = {{ 4, 5, 6 }}; baz = {{ 1, 2, 3 }}; std::cout << std::boolalpha << (var == baz) // true << (bar == baz); // false
2.1m questions
2.1m answers
60 comments
57.0k users