Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 228 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 228 Bytes

Count rectangles

Description

Given a list of carthesian pairs (x, y), return the number of rectangles formed by these pairs.

Example

Input:[ (1,3), (1,4), (2,3), (2,4), (3,3), (3,4), (4,3), (4,4) ]
Output: 4