You will be given a list of 32 bit unsigned integers. Flip all the bits ( and ) and print the result as an unsigned integer.
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.
Recursion: Fibonacci Numbers - Hacker Rank Solution
The Fibonacci Sequence
The Fibonacci sequence appears in nature all around us, in the arrangement of seeds in a sunflower and the spiral of a nautilus for example.
Saturday, May 30, 2020
Recursion: Davis' Staircase - Hacker Rank Solution
Recursion: Davis' Staircase - Hacker Rank Solution