- Write a program that fills and prints a matrix of size
N
xN
as shown below: (examples for N = 4)
- Write a program that reads a rectangular matrix of size
N
xM
and finds in it the square 3x3 that has maximal sum of its elements.
-
We are given a matrix of strings of size
N
xM
. Sequences in the matrix we define as sets of several neighbor elements located on the same line, column or diagonal. Write a program that finds the longest sequence of equal strings in the matrix. Example:
- Write a program, that reads from the console an array of
N
integers and an integerK
, sorts the array and using the methodArray.BinarySearch()
finds the largest number in the array which is <= K.
- You are given an array of strings. Write a method that sorts the array by the length of its elements (the number of characters composing them).
- * Write a class Matrix to hold a matrix of integers. Overload the operators for adding, subtracting and multiplying of matrices, indexer for accessing the matrix content and
ToString()
. - * Write a program that finds the largest area of equal neighbor elements in a rectangular matrix and prints its size. Example:
Hint: you can use the algorithm "Depth-first search" or "Breadth-first search".