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.
![](
def maximizingXor(l, r):
new_results = 0
for i in range(l, r + 1):
for j in range(l,r + 1):
old_result = i ^ j
if old_result >= new_results:
new_results = old_result
return new_resultshttps://)
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 →
![]( def maximizingXor(l, r): new_results = 0 for i in range(l, r + 1): for j in range(l,r + 1): old_result = i ^ j if old_result >= new_results: new_results = old_result return new_resultshttps://)