make all elements 0 in an array

Given an array of two elements having value 0 and 1, Make both elements 0, specifications : i) it is guaranted that one element is 0 but we do not know its position. ii) we can’t say about another element it can be 0 or 1. iii) we can only complement the element. iv) no other operation is allowed (and, or, multi, division…. etc.)


Post a Comment

Popular posts from this blog