what about full negative matrix,is it a Case?

what about full negative matrix,is it a Case?

Portrait de semihserhatk

what about full negative matrix,is it a Case?

9 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de mohamed.sherief

They didn't mention that, but i think we should handle this case by getting the area that has the maximum sum which will be the smallest negative elementonly. Example: Input: -11 -2 -12 -2 -1 -3 output: 1 1 1 1 I am not sure, but I think this assumption makes sense. Good luck! Regards, Mohamed

Portrait de alaa.abdelrahman

if all the matrix is negative you can assume that the maximum sum is zero and the coordinators of x, y are (-1,-1)(-1,-1)

Portrait de vakninyogev

negative matrix is to most simple case, just return the smallest negativ number index(x0 xx1 y0 y1).

Portrait de alaa.abdelrahman

can we make assumptions for our solution? or there isstandard solution for this case?

Portrait de mihaio07

I hope everybody knows that -1 > -2, making -1 the largest negative integer.

Portrait de vakninyogev

mihaio - good point !

Portrait de mashaaban

-1 is the largest negative number we can return it in case all the matrix is negative, if the matrix has a zero which is considered neither negative nor positive then we can return the zero as the largest integer or the -1 and both are correct as discussed by some algorithms

Portrait de dina_elreedy

I agree with that

Connectez-vous pour laisser un commentaire.