Results 1 to 3 of 3
  1. #1
    bishnu is offline Member
    Join Date
    Dec 2008
    Location
    Mumbai
    Posts
    5
    Rep Power
    0

    Thumbs down second largest array

    Hii all :cool:

    Hii fnds pls send the code to get the second largest no from the array.nad thge array is not sort.
    Thanx in advance.........

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    First of all, please choose the correct sub-forum next time to fost your question. If you have any doubts please read our FAQ page.

    If you want to find that second large of the array, and don't want to sort, only thing you have to do is get the first value and find the maximum. And then depend on that maximum, find the second maximum.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

Similar Threads

  1. Finding Largest Prime Factor
    By perito in forum New To Java
    Replies: 7
    Last Post: 11-08-2010, 08:25 PM
  2. Finding the largest number in an array
    By starchildren3317 in forum New To Java
    Replies: 14
    Last Post: 11-03-2010, 06:49 AM
  3. Replies: 5
    Last Post: 02-07-2009, 07:48 AM
  4. Largest string value (alphabetically)
    By mew in forum New To Java
    Replies: 3
    Last Post: 12-14-2007, 05:45 PM
  5. Finding largest no
    By bugger in forum New To Java
    Replies: 11
    Last Post: 11-29-2007, 12:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •