Skip to content

mohamed-gasser/black-square-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

black-square-algorithm

You are given an N × N matrix in which every cell is colored black or white. Columns are numbered from 0 to N-1 (from left to right). This coloring is represented by a non-empty array of integers A. If the K-th number in the array is equal to X then the X lowest cells in the K-th column of the matrix are black. The rest of the cells in the K-th column are white

Examples:

  1. Given A = [1, 2, 5, 3, 1, 3], the function should return 2.
  2. For example, the black square of side 2 contains the two lowest rows of the 1st and 2nd columns (counting from 0).

photo

Contact

You can communicate by following e-mails If you have more questions about the project or to get the all src code :

o mohamedgasser230@gmail.com

Releases

No releases published

Packages

No packages published

Languages