Open srinivasboga opened 21 hours ago
Summary: Create a function to find the second highest number in an array.
Input: {5, 13, 4, 21, 13, 27, 2, 59, 59, 34} Output: 59 (the second highest number)
Input
Output
Ensure to validate the input for edge cases, such as empty arrays or arrays with only one distinct element.
Hello, I am new to GitHub, and I want to contribute this one as my first issue.
Summary: Create a function to find the second highest number in an array.
Checkouts
Example Input/Output:
Input
: {5, 13, 4, 21, 13, 27, 2, 59, 59, 34}Output
: 59 (the second highest number)Additional Notes:
Ensure to validate the input for edge cases, such as empty arrays or arrays with only one distinct element.