Pergunta de entrevista da empresa Salesforce

Implement a HashTable.

Respostas da entrevista

Sigiloso

16 de mar. de 2016

Implemented a hashtable with array and internal buckets through a LinkedList. Spoke about collision, hashing functions. The interviewer asked he did not want to implement through a linkedlist but wanted to build another DS that was better than LinkedList. Went asking around the Big(0) complexity of the new to-be-implemented datastructure. Overall, the interview wasn't difficult, in my opinion it was irrelevant for a front-end role. I was expecting to talk more about JS, prototypal inheritance, etc.

Sigiloso

29 de mar. de 2016

use tree structure instead of linkedlist. the performance improve from O(n) to O(log n) BST[] table = new BST[maxSize];