Cookie and Privacy Settings

This website uses cookies to enable essential functions like the user login and sessions. We also use cookies and third-party tools to improve your surfing experience on preplounge.com. You can choose to activate only essential cookies or all cookies. You can always change your preference in the cookie and privacy settings. This link can also be found in the footer of the site. If you need more information, please visit our privacy policy.

Data processing in the USA: By clicking on "I accept", you also consent, in accordance with article 49 paragraph 1 sentence 1 lit. GDPR, to your data being processed in the USA (by Google LLC, Facebook Inc., LinkedIn Inc., Stripe, Paypal).

Manage settings individually I accept
4

Binary Search in Programming

Hello Everyone, I am new in this community and I am a graduate of B.tech in computer science and I am preparing myself to get a job in the IT industry. So I am covering basic programming questions and I am confused in the binary search working cycle. As my research, it is best applied to a list in which all the elements are already sorted. The binary search starts with searching in the middle of the list. Can anyone know is it the right information or can anyone know the best scenario for using a binary search? I am learning this list right now - https://hackr.io/blog/programming-interview-questions

Hello Everyone, I am new in this community and I am a graduate of B.tech in computer science and I am preparing myself to get a job in the IT industry. So I am covering basic programming questions and I am confused in the binary search working cycle. As my research, it is best applied to a list in which all the elements are already sorted. The binary search starts with searching in the middle of the list. Can anyone know is it the right information or can anyone know the best scenario for using a binary search? I am learning this list right now - https://hackr.io/blog/programming-interview-questions

Hey Ankit, this is mainly a platform for interviews in the consulting industry. As a result, I doubt that you will find what you are looking for here. Wish you all the best! — Anonymous A on Apr 10, 2020

the classic scenario for using binary search is when you want to find an element in a sorted list. Then, you can look at the middle element and conclude by comparing it to the target element(the one you look for) - what part of the sorted list you should keep exploring. each time you do it you can get rid of 1/2 of tha elements, and therefor the time complexity is O(logN). p.s I believe you should look for different place to ask about programming interview questions :) — Anonymous B on Apr 10, 2020 (edited)

4 answers

  • Upvotes
  • Date ascending
  • Date descending
Best Answer

Agree with experts here

André

Agree with experts here

André

Book a coaching with Antonello

98% Recommendation Rate

167 Meetings

6,608 Q&A Upvotes

USD 219 / Coaching

Hi Ankit, I confirm it will be very difficult to find here experts about these topit

Best,
Antonello

Hi Ankit, I confirm it will be very difficult to find here experts about these topit

Best,
Antonello

Book a coaching with Luca

100% Recommendation Rate

48 Meetings

2,595 Q&A Upvotes

USD 189 / Coaching

Hello Ankit,

Unless there won't be a data scientist consultant that reads your question, it's really unlikely that you can fin an answer to this on Preplounge :)

Best,
Luca

Hello Ankit,

Unless there won't be a data scientist consultant that reads your question, it's really unlikely that you can fin an answer to this on Preplounge :)

Best,
Luca

(edited)

Book a coaching with Clara

100% Recommendation Rate

59 Meetings

16,343 Q&A Upvotes

USD 229 / Coaching

Hello!

Agree with the 1st answer, given that this Q&A is targetted to people who want to get into consulting, probably is not the best forum for you...

Good luck in the prep!

Hello!

Agree with the 1st answer, given that this Q&A is targetted to people who want to get into consulting, probably is not the best forum for you...

Good luck in the prep!

Similar questions

No similar questions available