I have a matrix boolean 2D array and i want to find the the row with maximum number of 1s.
require 'matrix' m1 = Matrix[[0,1,1,1],[0,0,1,1],[1,1,1,1],[0,0,0,0]] print m1
can anyone help me out
Aucun commentaire:
Enregistrer un commentaire