Ruby: Map, max, count.
Leetcode: 1725. Number Of Rectangles That Can Form The Largest Square.\n\nRuby: Map, max, count.\n\nMap array from array of pairs into array of pair minumums, f
## Leetcode: 1725. Number Of Rectangles That Can Form The Largest Square.\n\n**Ruby: Map, max, count.**\n\nMap array from array of pairs into array of pair minumums, find maximum value of this array, count number of maximum value matches. That\'s it.\n\n\nRuby code:\n```Ruby\n# Leetcode: 1725. Number Of Rectangles That Can Form The Largest Square.\n# https://leetcode.com/problems/number-of-rectangles-that-can-form-the-largest-square/\n# Runtime: 68 ms, faster than 57.14% of Ruby online submissions for Number Of Rectangles That Can Form The Largest Square.\n# Memory Usage: 210.6 MB, less than 61.90% of Ruby online submissions for Number Of Rectangles That Can Form The Largest Square.\n# Thanks God!\n# @param {Integer[][]} rectangles\n# @return {Integer}\ndef count_good_rectangles(rectangles)\n    squares = rectangles.map(&:min)\n    max = squares.max\n    squares.count(max)\nend\n```\n\n
['Ruby']