DSA - hash tables Flashcards

1
Q

what are hash tables

A

similar to stack and queue, hash tables represents dynamic set of data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

which operations does hash table supports

A
  • hash tables supports insert / delete / search operation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is search average and worst search time for hash tables

A

average = O(1)
worst = O(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is another name for hash table

A

Dictionaries is another name for hash tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

definition of dictionaries
what does dictionaries represents

A

generic way to map keys to values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is hash table in context of dictionaries

A

hash tables are specific ways to implement a dictionaries using a hashing function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

write dictionary example

A

dict = {
‘a’: 1,
‘b’: 9,
‘c’: ‘swapnil’,
‘d’: true
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

write dictionary in python

A

dictionary[‘a’] = False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are direct access tables

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

hashing by division

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly