- Notifications
You must be signed in to change notification settings - Fork870
Open
Description
The solution for Q_04_25 is incorrect. The code gives wrong output for:
first City = Chicago
second City = Los Angeles
third City = Atlanta
Correct Logic:
if ( first.compareTo(second) > 0) { temp = first; first = second; second = temp; } if( first.compareTo(third) > 0) { temp = first; first = third; third = temp; } if( second.compareTo(third) > 0 ) { temp = second; second = third; third = temp; }
Metadata
Metadata
Assignees
Labels
No labels