We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Time complexity is O(n);
Ex:1 2 3 4 5 l=1 and r=5
property:Ex-or operations commutative.
1@2 2@4 3@4 4@5
1@3
1@4
1@5
first time,it take n-1 @(ex-or) operation and after that only 1 for each input
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →
Time complexity is O(n); Ex:1 2 3 4 5 l=1 and r=5 property:Ex-or operations commutative. 1@2 2@4 3@4 4@5 1@3 1@4 1@5 first time,it take n-1 @(ex-or) operation and after that only 1 for each input