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
565
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
565
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
355
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
355
views
go-alogrithms-1
recurrence-relation
algorithms
numerical-answers
1
vote
1
vote
2
answers
2
Bikram
asked
in
Algorithms
Oct 4, 2016
747
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
747
views
go-alogrithms-1
numerical-answers
algorithms
hashing
2
votes
2
votes
2
answers
3
Bikram
asked
in
Algorithms
Oct 4, 2016
562
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
562
views
go-alogrithms-1
numerical-answers
recurrence-relation
5
votes
5
votes
2
answers
4
Bikram
asked
in
Algorithms
Oct 3, 2016
1,537
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
1.5k
views
go-alogrithms-1
algorithms
expectation
numerical-answers
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy