Java One Line


  • 0
    G
    # code block
    public class Solution {
        public int findComplement(int num) {
            return (Integer.highestOneBit(num)*2-1)-num;
        }
    }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.