Maximizing XOR Discussions | Algorithms | HackerRank
  • + 0 comments

    Simple and Easy Solution in Python If helps you please upvote to help others

    maximum=0
        for i in range(l,r+1):
            for j in range(i,r+1):
                print(i,j)
                val=i^j
                maximum= max(maximum,val)
        return maximum