Bin Multiple Choice Questions and Answers (MCQs)

This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Bin”.

1. What is the use of the bin data structure?
a) to have efficient insertion
b) to have efficient deletion
c) to have efficient region query
d) to have efficient traversal
View Answer

Answer: c
Explanation: Bin data structure allows us to have efficient region queries. A frequency of bin is increased by one each time a data point falls into a bin.

2. Bin is an example of a range query data structure.
a) true
b) false
View Answer

Answer: a
Explanation: Bin is an example of a range query data structure. It is because it efficiently answers any number of queries on any subset of the input.

3. What is the worst case time complexity of query operation(n is the no. of candidates)?
a) O(1)
b) O(n)
c) O(log n)
d) O(n log n)
View Answer

Answer: b
Explanation: The worst case in a bin query occurs when all the candidates are concentrated in one bin. So in this case the time complexity is O(n).
advertisement
advertisement

4. What is the worst case time complexity of delete operation(n is the no. of candidates)?
a) O(1)
b) O(n)
c) O(log n)
d) O(n log n)
View Answer

Answer: b
Explanation: The worst case in a bin delete operation occurs when all the candidates are concentrated in one bin. So in this case the time complexity is O(n).

5. What is the worst case time complexity of insertion operation(n =no. of candidates)?
a) O(1)
b) O(n)
c) O(log n)
d) O(n log n)
View Answer

Answer: a
Explanation: The worst case in a bin insert operation occurs when all the candidates are concentrated in one bin. So in this case the time complexity is O(1).
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. What is computational geometry?
a) study of geometry using a computer
b) study of geometry
c) study of algorithms
d) study of algorithms related to geometry
View Answer

Answer: d
Explanation: Computational geometry deals with the study of algorithms which can be expressed in terms of geometry. Bin data structure is an example of it.

7. What will be the time complexity of query operation if all the candidates are evenly spaced so that each bin has constant no. of candidates? (k = number of bins query rectangle intersects)
a) O(1)
b) O(k)
c) O(k2)
d) O(log k)
View Answer

Answer: b
Explanation: The process of query becomes faster in a case when the number of candidates are equally distributed among the bins. In such a case the query operation becomes O(k).
advertisement

8. What will be the time complexity of delete operation if all the candidates are evenly spaced so that each bin has constant no. of candidates? (m = number of bins intersecting candidate intersects)
a) O(1)
b) O(m)
c) O(m2)
d) O(log m)
View Answer

Answer: b
Explanation: The process of deletion becomes faster in a case when the number of candidates are equally distributed among the bins. In such a case the query operation becomes O(m). It is practically slower than insertion in this case.

9. What will be the time complexity of insertion operation if all the candidates are evenly spaced so that each bin has constant no. of candidates? (m = number of bins intersecting candidate intersects)
a) O(1)
b) O(m)
c) O(m2)
d) O(log m)
View Answer

Answer: b
Explanation: The process of insertion becomes faster in the case when the number of candidates are equally distributed among the bins. In such a case the query operation becomes O(m). It is practically faster than deletion in this case.
advertisement

10. Efficiency of bin depends upon ___________
a) size of query and candidates
b) location of query and candidates
c) location and size of query and candidates
d) depends on the input
View Answer

Answer: c
Explanation: Efficiency of bin depends upon the location and size of query and candidates. It is similar to that of a hash table.

11. Bigger the query rectangle the better is the query efficiency.
a) true
b) false
View Answer

Answer: b
Explanation: Efficiency of bin depends upon the location and size of query and candidates. Also, the smaller is the query rectangle the better is the query efficiency.

Sanfoundry Global Education & Learning Series – Data Structure.

To practice all areas of Data Structure, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.