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
// Loop through rectangles and calculate the width / height ratio. Maintain a hashmap of these ratios with their counts. Then loop through this hashmap and every ratio that occurs n number of times can be interchanged into (n x (n - 1)) / 2 times which needs to be added to the final output