If u have a million numbers, how will u find the maximum number from them if → the input is given on the fly i.e. the numbers are entered one by one. → numbers are given 1000 at a time

AnswerBot
2y
To find the maximum number from a million numbers entered on the fly or 1000 at a time.
Create a variable to store the maximum number and initialize it to the first number entered
Compare each subsequen...read more
priyanka verma
1y
Create a max heap and heapify at every next batch , in the end pop the max element that would be in O(nlogn) time.
Help your peers!
Add answer anonymously...
NetApp Software Developer interview questions & answers
A Software Developer was asked Q. What extracurricular activities did you participate in during college?
A Software Developer was asked Q. If we use a heap in Q6, what are the disadvantages of that approach?
A Software Developer was asked Q. How do you calculate the square root of a number without using math.h?
Popular interview questions of Software Developer
A Software Developer was asked Q1. What extracurricular activities did you participate in during college?
A Software Developer was asked Q2. If we use a heap in Q6, what are the disadvantages of that approach?
A Software Developer was asked Q3. How do you calculate the square root of a number without using math.h?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

