Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
01. Matrix Variant A
01. Matrix Variant B
01. Matrix Variant C
01. Matrix Variant D
02. Maximal Sum of Square
03. Longest sequence of equal strings
04. Largest number using Binary Search
05. Sort strings by its length
06. Create class Matrix
07. Largest area of equal elements
02. Multidimensional Arrays.sln
02. Multidimensional

Multidimensional Arrays

  1. Write a program that fills and prints a matrix of size NxN as shown below: (examples for N = 4)


  1. Write a program that reads a rectangular matrix of size NxM and finds in it the square 3x3 that has maximal sum of its elements.
  • We are given a matrix of strings of size NxM. 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:


  1. Write a program, that reads from the console an array of N integers and an integer K, sorts the array and using the method Array.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".

You can’t perform that action at this time.