I need a program to replace duplicate value with 0 in matrix form . | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

I need a program to replace duplicate value with 0 in matrix form .

How to make suggest me logics .

16th May 2020, 7:51 AM
Om Sri
1 Réponse
+ 2
Iterate over the matrix and count the number(how many times the element gets repeated) whenever you encounter the number for the second time replace that with zero... Hope it works
16th May 2020, 8:09 AM
sarada lakshmi
sarada lakshmi - avatar