Add FindSecondLargestSort#523
Conversation
There was a problem hiding this comment.
This doesn't really look like an algorithm.
The second largest number can be derived using any of the sort algorithm and simply accessing the second index.
@pomkarnath98, @itsvinayak, @ruppysuppy what do you guys think?
|
@marsonya The issue with accessing the second number is when you get an array such as: [1, 2, 4, 6, 7, 8, 10, 10] The second largest is 8, but choosing the second to last index would return 10. This algorithm filters for unique values. It bypasses the case of repeating numbers. |
I too feel the same. Let's hear what others think |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Welcome to JavaScript community
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.