Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

pyhton pyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhton, Thesis of Computer Vision

pyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhton

Typology: Thesis

2017/2018

Uploaded on 05/11/2018

ishan-kumar
ishan-kumar 🇮🇳

1 document

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
(Hash Tables)
Q1) Assume you have a hash table composed of 11 slots, using linear probing, show how the table will
look like after the following operations:
(Note: h(key)=key %11.)
(a) (b)
1. Insert an object with key (26).
2. Insert an object with key (15).
3. Insert an object with key (38).
4. Delete an object with key(15).
5. Insert an object with key(4).
1. Insert an object with key (21).
2. Insert an object with key (10).
3. Insert an object with key (32).
4. Delete an object with key(10).
5. Insert an object with key(12).
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
9
10
Q2) Assume you have a hash table composed of 11 slots, using quadratic probing, show how the table
will look like after the following operations:
(Note: h(key)=key %11.)
(a) (b)
1. Insert an object with key (26).
2. Insert an object with key (15).
3. Insert an object with key (4).
4. insert an object with key(37).
5. Insert an object with key(48).
1. Insert an object with key (21).
2. Insert an object with key (10).
3. Insert an object with key (32).
4. Insert an object with key(43).
5. Insert an object with key(12).
0
1
2
3
4
5
6
7
8
9
10
0
1
2
3
4
5
6
7
8
9
10
3
pf3

Partial preview of the text

Download pyhton pyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhtonpyhton and more Thesis Computer Vision in PDF only on Docsity!

(Hash Tables)

Q1) Assume you have a hash table composed of 11 slots, using linear probing , show how the table will look like after the following operations: (Note: h(key)=key %11.)

(a) (b)

  1. Insert an object with key (26).
  2. Insert an object with key (15).
  3. Insert an object with key (38).
  4. Delete an object with key(15).
  5. Insert an object with key(4).
    1. Insert an object with key (21).
    2. Insert an object with key (10).
    3. Insert an object with key (32).
    4. Delete an object with key(10).
    5. Insert an object with key(12). 0 1 2 3 4 5 6 7 8 9

Q2) Assume you have a hash table composed of 11 slots, using quadratic probing , show how the table will look like after the following operations: (Note: h(key)=key %11.)

(a) (b)

  1. Insert an object with key (26).
  2. Insert an object with key (15).
  3. Insert an object with key (4).
  4. insert an object with key(37).
  5. Insert an object with key(48).
    1. Insert an object with key (21).
    2. Insert an object with key (10).
    3. Insert an object with key (32).
    4. Insert an object with key(43).
    5. Insert an object with key(12). 0 1 2 3 4 5 6 7 8 9

Q3) Assume you have a hash table composed of 11 slots, using double hashing , show how the table will look like after the following operations: (Note: h(key)=key %11, h2(key)=9-(key%9)

  1. Insert an object with key (26).
  2. Insert an object with key (15).
  3. Insert an object with key (4).
  4. insert an object with key(37).
  5. (^) Insert an object with key(48). 0 1 2 3 4 5 6 7 8 9

Q4) Assume you have a hash table composed of 11 slots, using separate chaining , show how the table will look like after the following operations: (Note: h(key)=key %11)

  1. Insert an object with key (26).
  2. Insert an object with key (22).
  3. Insert an object with key (4).