info@meritcampus.com    +91-85006-22255
...

Write a program to check if the number is accepted at the given 2x3 sudoku position. The empty positions are marked as 0.

Input (int[][],int number, SudokuPosition) Output (Boolean)
`0 0 2 4 0 00 0 0 0 0 60 3 0 0 0 52 0 0 0 4 04 0 0 0 0 00 0 1 6 0 0number 4 and SudokuPosition is [2, 4]` false
`0 1 3 0 0 00 0 2 0 0 03 4 0 1 0 00 0 1 0 3 50 0 0 3 0 00 0 0 2 6 0number 5 and SudokuPosition is [1, 5]` true

``` class IsNumberAcceptedAt2x3SudokuPosition {    public static void main(String s[])    {        int[][] sudoku = {{1, 0, 2, 4, 0, 0}, {0, 0, 0, 0, 0, 6}, {0, 3, 0, 0, 0, 5}, {2, 0, 0, 0, 4, 0}, {4, 0, 0, 0, 0, 0}, {0, 0, 1, 6, 0, 0}};        System.out.println("2 can be placed at position [3, 4] : " + isNumberPlacedAtGivenPosition(sudoku, 2, new SudokuPosition(3, 4)));    } public static boolean isNumberPlacedAtGivenPosition(int[][] sudoku, int number, SudokuPosition sudokuPosition) { //Write code here to check if the number is accepted at the given 2x3 sudoku position. } } class SudokuPosition { int rowPosition; int columnPosition; public SudokuPosition(int rowPosition, int columnPosition) { this.rowPosition = rowPosition; this.columnPosition = columnPosition; } } ```
0
Wrong
Score more than 2 points