I am having trouble figuring out how to calculate the big O notation for a project. What would the big O notation be for a 3x3 grid, or a nxn grid with n being decided by the user.
Also, if I output a 3x3 grid multiple times, do I add the big O notations of each array together, or is there just one big O notation for all?
Sorry, I'm a little confused on how big O notation works and how to calculate it, and what parts of code it can be used for.
I really don't know what to do, this is the code for my multidimentional array.
String board[][] = new String[3][3];
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board[0].length; j++) {
board[i][j] = "-";
}
}