Given a list of integers, write a function to check if the list can be rearranged in such a way that the sum of any two adjacent elements is a perfect square. Return True if it's possible, False otherwise.
Example:
Input:
[1, 3, 2, 7, 8, 5]
Output:
True
Make sure you return your solution, don't print!
AI
Bot
Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.