ITRON | Software Engineer | 5 December 19

Question · Posted Apr 2020

Given the sum and xor of two numbers X and Y s.t. sum and xor lies in range of [0 , (2^64) - 1 ] we need to find the numbers minimizing the value of X. Input : S = 17 X = 13 Output : a = 2 b = 15 Input : S = 1870807699 X = 259801747 Output : a = 805502976 b = 1065304723

The full answer & interview discussion are available to premium members.

Log in Create a free account