It gives me below compilation error
Main.java:224: error: incompatible types: MyList<Integer> cannot be converted to int[]
TreeNode ans = obj.sortedArrayToBST(A);
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
even though I am just returning null for testing purpose:
public class Solution {
// DO NOT MODIFY THE ARGUMENTS WITH "final" PREFIX. IT IS READ ONLY
public TreeNode sortedArrayToBST(final int[] A) {
return null;
}
}