Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8258003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:23:35+00:00 2026-06-08T02:23:35+00:00

I have an array contains 10 integer values. Now I want to find out

  • 0

I have an array contains 10 integer values. Now I want to find out the
second highest number.I should not use any java API. This question was asked by one interviewer to me. He wants the logic.And his requirement is, I should not traverse through the the entire elements. Is there any way where we can achieve the result without traversing?
Travesing means going through all the elements in the array. I thought for long time.Finally I gave up. If any one can explain, it would be nice. And also I asked about Sorting. He does not want the array to be sorted.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:23:38+00:00Added an answer on June 8, 2026 at 2:23 am

    No, it’s completely impossible. If you don’t look at all the data, you can’t possibly know the second highest value.

    You don’t have to sort all the data, of course, which may be what your interviewer meant – but you do need to look at every element at least once. Every element has the possibility of changing the result, so needs to be examined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Array that contains some elements multiple times. Now I want to
I have an array which contains 12 numbers and I want to save this
I have an array that contains the RGB colour values for each pixel in
I have an integer array of length 900 that contains only binary data [0,1].
I have a numpy array data that just contains a set of integer counts.
When I do a find or fetch , the returned array of values contains
I have an array and it has some data in it. This array contains
I have an array that contains @sign in the object. I can't access that
I have an array which contains a set of UIImage in byte forms. --My
I have an array which contains another array Would I notate it this way?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.