Matchstick square
Your task
Given matchstick lengths, determine whether you can use every matchstick exactly once to form the four equal-length sides of a square (you may not break a matchstick). 1 <= len(matchsticks) <= 12, lengths are positive. Return a boolean.
Examples
makesquare(matchsticks: list[int]) -> boolExample 1
Input
makesquare([1, 1, 2, 2, 2])Output
True