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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyNDEzNjYsIm5iZiI6MTcxOTI0MTA2NiwicGF0aCI6Ii81NzgxODUwNi8zMDI1MTEwMTYtZDI5M2ZmYTUtZDRjNi00ZmUwLWJhODYtOTE0YmRlM2M5NDkxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDE0NTc0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM5ZmQ0MmJlMDYxMzliZjA2OGQ5OWY5ZTBjMjhmYzU4OGYwMmIyOGYwZWMzM2U5NTdhZTI0Y2M2YjdlMzdmNDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.B2A8hnDyK7jwFCbDyduxDT5E8KkX6_ZuL_hJ_hIaakg)
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.