I can't understand that. I need my glassesOriginally Posted by ;
To discover the second highest, you begin with two vars... h1, and h2. You set them to zero. When you discover a value higher than h2, you set h2 to that value, then you check if the value in h2 is also greater than the value in h1 and when it is you swap the values between h1 and h2. Now you have the best, and second greatest values.
Or, you simply dump all values in an array and do some type of bulk sorting. That is terribly wasteful.