1 Crore+ students have signed up on EduRev. Have you? Download the App |
Which of the following collision resolution techniques is used in separate chaining?
The Rabin-Karp algorithm is primarily used for which of the following?
What will be the output of the following code?
#include <iostream>
#include <unordered_map>
int main() {
std::unordered_map<int, std::string> map;
map[1] = "Alice";
map[2] = "Bob";
map[3] = "Charlie";
std::cout << map[2] << std::endl;
return 0;
}
What will be the output of the following code?
#include <iostream>
#include <unordered_map>
int main() {
std::unordered_map<int, int> map;
for (int i = 0; i < 5; i++) {
map[i] = i * 10;
}
std::cout << map[5] << std::endl;
return 0;
}
What will be the output of the following code?
#include <iostream>
#include <unordered_map>
int main() {
std::unordered_map<int, int> map;
map[1] = 10;
map[2] = 20;
map[3] = 30;
map[4] = 40;
std::cout << map.size() << std::endl;
return 0;
}
What will be the output of the following code?
#include <iostream>
#include <unordered_map>
int main() {
std::unordered_map<int, int> map;
map[1] = 10;
map[2] = 20;
map[3] = 30;
map[4] = 40;
map.erase(2);
std::cout << map.size() << std::endl;
return 0;
}
What will be the output of the following code?
#include <iostream>
#include <unordered_map>
int main() {
std::unordered_map<char, int> map;
map['a'] = 1;
map['b'] = 2;
map['c'] = 3;
map['d'] = 4;
std::cout << map['z'] << std::endl;
return 0;
}
Which of the following hashing techniques uses the concept of linear probing?
Which of the following statements about open addressing is false?
The Rabin-Karp algorithm uses which of the following concepts?
Which of the following collision resolution techniques is used in open addressing?
Which of the following is a drawback of using separate chaining for collision resolution?