self.arr[i][j] giving error code example Example: if(arr[i]==k) return arr[i]; if(arr[i]==k){ return arr[i]; }