Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
GATE Overflow | Algorithms | Test 1 | Question: 17
Bikram
asked
in
Algorithms
Oct 4, 2016
258
views
2
votes
2
votes
While inserting keys 12,44,13,88,23,94,11,39,20,16 and 5 in a 11 item hash table using the hash function $h(i) = (2i+5) \mod 11$, total number of collisions that occur is _________ (On collision no insertion takes place)
go-alogrithms-1
numerical-answers
Bikram
asked
in
Algorithms
Oct 4, 2016
by
Bikram
258
views
answer
comment
Follow
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
4
votes
Hashvalues will be
12 - 29 mod 11 = 7
44 - 93 mod 11 = 5
13 - 31 mod 11 = 9
88 - 181 mod 11 = 5 - collission
23 - 51 mod 11 = 7 - collision
94 - 193 mod 11 = 6
11 - 27 mod 11 = 5 - collision
39 - 83 mod 11 = 6 - collision
20 - 45 mod 11 = 1
16 - 37 mod 11 = 4
5 - 15 mod 11 = 4 - collision
So, 5 collisions.
Arjun
answered
Oct 8, 2016
by
Arjun
comment
Follow
share this
4 Comments
Show 3 previous comments
by
Kapil
commented
Oct 13, 2016
reply
Follow
share this
No need to follow !! just count the collisions .
0
0
by
Prashant.
commented
Oct 13, 2016
reply
Follow
share this
m asking when coliisio happed ex: 45 is collide then where to push 45 in hash table,
0
0
by
Arjun
commented
Oct 14, 2016
reply
Follow
share this
@Anirudh yes, that must have been mentioned in question - otherwise its ambiguous. Added now.
3
3
Please
log in
or
register
to add a comment.
Answer:
5
← Previous
Next →
← Previous in category
Next in category →
Related questions
2
votes
2
votes
2
answers
1
Bikram
asked
in
Algorithms
Oct 4, 2016
177
views
GATE Overflow | Algorithms | Test 1 | Question: 29
$T(n) = \begin{cases} 4 & \quad if \: \: n =1 \\ T(n-1) + 4 & \quad otherwise \end{cases}$ Value of $T(1000)$ is ___
Bikram
asked
in
Algorithms
Oct 4, 2016
by
Bikram
177
views
go-alogrithms-1
recurrence-relation
algorithms
numerical-answers
1
vote
1
vote
2
answers
2
Bikram
asked
in
Algorithms
Oct 4, 2016
434
views
GATE Overflow | Algorithms | Test 1 | Question: 27
Consider a hash table of size $m = 10$ and a corresponding hash function $h(k) = k A \mod m$ for $A = 5$ where collisions are resolved by quadratic probing. The location (starting from 1) to which the key 65 is mapped if the current contents of hashtable is $4 \;8 \;\_ \;\_ \;7 \;8 \;6 \;\_\; 0\; \_$ is _______
Bikram
asked
in
Algorithms
Oct 4, 2016
by
Bikram
434
views
go-alogrithms-1
numerical-answers
algorithms
hashing
2
votes
2
votes
2
answers
3
Bikram
asked
in
Algorithms
Oct 4, 2016
326
views
GATE Overflow | Algorithms | Test 1 | Question: 10
Consider the following recurrence relation. $T(n) = \begin{cases}1 & \quad if \: n = 1 \\ T(n-1) + 2^n \quad & otherwise \end{cases}$ What will be the value of $T(10)$?
Bikram
asked
in
Algorithms
Oct 4, 2016
by
Bikram
326
views
go-alogrithms-1
numerical-answers
recurrence-relation
5
votes
5
votes
2
answers
4
Bikram
asked
in
Algorithms
Oct 3, 2016
805
views
GATE Overflow | Algorithms | Test 1 | Question: 4
Consider the following algorithm for searching for a given number $x$ in an unsorted array $A[1...n]$ having $n$ values : Sequentially choose $i$ from 1 to n if A[i] = x then Stop else Goto 1 Let $x$ be present in A two times, what is the expected no of comparisons made by the algorithm before it terminates for $n=5$?
Bikram
asked
in
Algorithms
Oct 3, 2016
by
Bikram
805
views
go-alogrithms-1
algorithms
expectation
numerical-answers
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
RECRUITMENT IN OIL AND GAS CORPORATION LIMITED
Aptitude Overflow Book
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(647)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(855)
Recent Blog Comments
@abir_banerjee Thanks Abir. I'm third year...
@nolan_keats Currently I am in third year...
@abir_banerjee thank you Abir.Supposing you...
@nolan_keats just a suggestion as I also...
@abir_banerjee Hope I can do this in span of one...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy