You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sort_ascend function needs to be refactored by removing int cast of return value and compare the two values and return 1 when a > b or 0 if a == b and -1 if a < b to prevent losing precision in inputs like {1.2, 1.5, 1.3, 1.8, 1.7} won't be sorted correctly as they all evaluates to zeros
The text was updated successfully, but these errors were encountered:
sort_ascend function needs to be refactored by removing int cast of return value and compare the two values and return 1 when a > b or 0 if a == b and -1 if a < b to prevent losing precision in inputs like {1.2, 1.5, 1.3, 1.8, 1.7} won't be sorted correctly as they all evaluates to zeros
The text was updated successfully, but these errors were encountered: