You will be given a list of 32 bit unsigned integers. Flip all the bits ( and ) and print the result as an unsigned integer.
Showing posts with label Miscellaneous. Show all posts
Showing posts with label Miscellaneous. Show all posts
Tuesday, October 27, 2020
Maximum Xor - Hacker Rank Solution
You are given an array of elements. A list of integers, is given as an input, find the maximum value of for all , where represents xor of two elements.
Friend Circle Queries - Hacker Rank Solution
The population of HackerWorld is . Initially, none of the people are friends with each other. In order to start a friendship, two persons and have to shake hands, where . The friendship relation is transitive, that is if and shake hands with each other, and friends of become friends with and friends of .
Time Complexity: Primality - Hacker Rank Solution
A prime is a natural number greater than that has no positive divisors other than and itself. Given integers, determine the primality of each integer and print whether it is Prime or Not prime on a new line.
Subscribe to:
Posts (Atom)