Complete all six TODO's in the Snail class.
TODO 1
A helper method that prints the contents of a 1D array.
TODO 2
A helper method that prints the contents of a 2D array.
TODO 3
A helper method that checks to see whether a 1D array's length is a perfect square.
TODO 4
A helper method that checks to see whether a 2D array is square or not.
TODO 5
Takes a 2D array and returns a 1D array. The contents of the 1D array should be in a snail order traversal.
![image](https://private-user-images.githubusercontent.com/57818506/302511016-d293ffa5-d4c6-4fe0-ba86-914bde3c9491.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUzOTEyNTUsIm5iZiI6MTcyNTM5MDk1NSwicGF0aCI6Ii81NzgxODUwNi8zMDI1MTEwMTYtZDI5M2ZmYTUtZDRjNi00ZmUwLWJhODYtOTE0YmRlM2M5NDkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAzVDE5MTU1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkN2YyYzc4MDc4YjljNzAzYmI5YmJkMDEzZjY0Y2RjMDU2ODk4MzVhMDQzYzg5NTQ3YmQ2MjY3YWNjZjVmZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.210aPTPV9l3rFVDYXKrujxyr8XxYc6k0sJoM--MqVjQ)
If the above 2D was passed to this method, then an array resembling [1,2,3,6,9,8,7,4,5] should be returned.
TODO 6
Takes a 1D array and returns a 2D array. The contents of the 2D array should be in a snail order traversal. Effectively, you are packing the 1D array into a snail formation.
If an array resembling [1,2,3,4,5,6,7,8,9] was passed to this method, then a 2D array resembling
{
{1,2,3},
{8,9,4},
{7,6,5}
}
should be returned.