I need a program to replace duplicate value with 0 in matrix form . | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answer
+ 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