-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Bits
Mission Peace edited this page Apr 21, 2016
·
3 revisions
- Add two number in binary representation - AddTwoNumberInBinaryRepresentation.java
- Given an integer and number k, right or left rotate bits in this integer by k - BitRotation.java
- Using byte array for storing information - ByteAsStorage.java
- Count number of set bits in an integer - CountBits.java
- Given a screen in form of byte array with width and start and end points of a horizontal line. Draw this line DrawHorizontalLine.java
- Given an array in which every number occurs 3 times find this one number occurring only once - FindNumberOccurringOnceOtherNumbers3Times.java
- Given two numbers M and N, insert M into N from i to j bits of N - InsertMintoNiTojBits.java
- Given an integer find next higher/lower integer with same number of set bits as original integer - NextHigherAndNextLowerWithSameNumberBits.java
- Given an integer find next power of 2 greater than this integer - NextPowerOf2.java
- Given an array find one/two number occurring odd number of times - NumberOccuringOddTimes.java
- Given two numbers M and N, how many bit flips are required to convert M into N - NumberOfBitsFlipToConvertNToM.java
- Convert a real number(with decimals) into a binary number - RealNumberToBinary.java
- Given an integer reverse bits of this integer - ReverseBits.java
- Given an integer swap its odd bits with even bits at every position - SwapOddEvenBits.java
- Given an integer and two numbers i and j, swap bits at these positions in this integer - SwapTwoBits.java
- Initially there is a number n. Two players start playing a game turn by turn. Each player has to replace the number n written on the board by n-2^k (for some k >= 0 such that 2^k < n) - WinnerWithBeautifulNumber.java
- Square of a number without using * or ^ operator - SquareOfNumber.java
- Find two missing number where there are n-2 unique numbers in range 1 to n. Find one missing and one repeated number where all numbers are in range 1 to n. MissingNumbers.java
- Repeated dna sequence of length 10 - RepeatedDnaSequence.java
- Get first 2^n gray code - GrayCode.java
- Return an array which gives count of bits till num - CountingBitsTillNum.java
- Find max product of words length in given array - MaxProductWordLength.java