Row-major order and column-major order are methods used for storing multi-dimensional arrays in linear, one-dimensional memory spaces like RAM. The choice between row-major order and column-major order can impact performance depending on the nature of the operations being performed on the array. Here are some considerations and reasons for using row-major order:

The way we represent a 2D board is through a list of lists. For example:
has 3 rows and 3 columns.

We want to flatten a 2D list into a 1D array in two different ways: row-major order (rmo) and column-major order (cmo). For both blocks, recursion is banned. You must use either HOFs or Iteration in your solution.
Row-Major and Column-Major Order
Row-Major and Column-Major Order
TODO: Implement the RMO of board block. The input is a 2D board of size NxN (N rows, N columns). The output is a 1D list in row-major order. the first N items of the list will be the entries in row 1. The next N items will be the entries in row 2, and so on.


Then, implement the CMO of board block. The input is a 2D board of size NxN (N rows, N columns). The output is a 1D list in column-major order. The first N items of the list will be the entries in column 1, across all rows. The next N items will be the entries in column 2, across all rows, and so on. Hint: Check out the combinations block if you are doing this using HOFs.