Leetcode - Design HashMap (Python)

preview_player
Показать описание
March 2021 Leetcode Challenge
Leetcode - Design HashMap #706
Difficulty: Easy

Before you downvote, I know there are better solutions, I didn't feel like going into them today, plus I don't think it's really worth it
Рекомендации по теме
Комментарии
Автор

Me after designing Hashmap for 2 hours and saw this one minute solution.

Pikachu-rwnj
Автор

Why isn't the time complexity of get o(1), we are just getting the value at a specific index

vaibhavsinghparmar
Автор

But this solution cannot handle collisions right?

shreehari
Автор

But when I ran it, it returns the runtime error.

유승김-bi
Автор

super simple! I couldnt get it to run but they might have changed the test cases

chilo
Автор

I am getting runtime error for this problem. :(

bharatapar
Автор

Yo! I feel you man! These problems are more 'design' like questions and when you get them its like 'ugh, why couldn't you give me an algorithmic one!' lol Not sure how likely this would come up in an interview, but good to know 'about' at least.

janmichaelaustria