Data Structure Flashcards
to what DB the questions of Strings is similar to?
Arrays
How does hash map works?
check
what is the problem in hash map?
number of collision is very high
worst case runtime of hash map?
O(N) n is the number of keys, but good implementation keeps collision to minimum the run time is O(1)
how to implement hash table with balanced binary search tree?
IDK
what is an array list? and what is it’s access run time?
it’s an array that resize itself as needed while providing O(1) access
what is the run time of resizing the array list?
O(N) n is the number of items in the array list, but it happens so rarely, we can say that the insertion time is O(1)
why the run time of insertion in array list is O(1)
IDK
what is a linked list?
it’s a data structure that represent a sequence of nodes.
linked list vs array?
IDK
How to implement a linked list?
IDK
what is the difference between looping while(n.next != null), while(n!= null), or while(n.next.next != null).
where n is the current node.
IDK
what is the difference between singly and doubly linked list?
IDK
what is the runner technique in Linked lists?
it’s a second pointer technique.
means iterate through the linked list with two pointers simultaneously.
linked list and recursion.
IDK