What wrong with my approach in flood fill [dp]?

code link: https://ide.codingblocks.com/s/248606

@dhruv.160410116084 hey I have made some changes to code ,pls check it,also take input directly into array not into list then converting into array:

why i can’t take input in list ?

@dhruv.160410116084 hey you can take but again converting them to array make no sense ,so just already take input in array to reduce your work,check the input of array in java.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.