Ayush7614 / Daily-Coding-DS-ALGO-Practice

A open source project🚀 for bringing all interview💥💥 and competative📘 programming💥💥 question under one repo📐📐
https://daily-ds-algo.github.io/DS-Algo-Website/
MIT License
321 stars 474 forks source link

A XOR Challenge #1824

Closed KushagraJain58-cmd closed 3 years ago

KushagraJain58-cmd commented 3 years ago

Aim

Want to add a solution of "A XOR Challenge" Kindly assign me this problem. I would like to add my solution to this problem in C++ easily and efficiently using BIT Manipulation using c++ language. Link to the problem: https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/practice-problems/algorithm/xor-challenge-2420f189/

Details

You are given an integer C such that the XOR of two integers (A,B) is C. In short A⊕B=C (⊕ denotes the bitwise the XOR operation). Out of all possible pairs of A and B, you must find two integers such that their product is maximum. Let us define L(A) as the length of A in its binary representation. Then, L(A)≤L(C) and L(B)≤L(C).

Sample Input 13 Sample Output 70

Programming language

KushagraJain58-cmd commented 3 years ago

Please assign me this issue under LGM-SOC'21

KushagraJain58-cmd commented 3 years ago

Please assign me this issue under LGM-SOC'21 @ravikr126

KushagraJain58-cmd commented 3 years ago

Please assign me this issue under LGM-SOC'21 @ravikr126 @Amit366

nidh-cyber commented 3 years ago

Please assign me this issue under LGM-SOC'21 @ravikr126 @Amit366.

2000shivam659 commented 3 years ago

Please assign me this under LGM-SOC'21 @Amit366 @ravikr126 @Ayush7614

I would like to solve this using JAVA .

Programing Language