write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview

Answer Posted / shruti

In binary search , we have sorted array.

Hence the last number in the array is the largest number
among the given list.. :-)


Ur interviewer has to be very intelligent.. :-)
Gud ques though..

Is This Answer Correct ?    18 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is fortran still used today?

592


What is the difference between mpi and openmp?

721


Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer

3827


What does it mean when the linker says that _end is undefined?

621


What are the properties of union in c?

577






What are the 4 data types?

585


Why we use stdio h in c?

567


what is different between auto and local static? why should we use local static?

630


Which control loop is recommended if you have to execute set of statements for fixed number of times?

801


How can I invoke another program or command and trap its output?

602


What is a structure in c language. how to initialise a structure in c?

595


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2145


How to set file pointer to beginning c?

651


Explain why c is faster than c++?

562


How can I recover the file name given an open stream?

543