Leetcode 473. Matchsticks to Square
Determine whether the matchsticks can be partitioned into four groups with equal total length (forming the four sides of a square) using every stick exactly once — return false if the total sum isn't divisible by 4 or any stick exceeds the target side length; with n ≤ 15 this is typically solved by backtracking/bitmask search.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.