Skip to content

Latest commit

 

History

History

challenge-35

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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