Skip to content
a collection of geeksforgeeks questions solved in java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
README.md
pom.xml

README.md

GeeksForGeeks Solutions Build Status codecov Last Commit

BitManipulation (io.algonomics.gfg.algos.bitman)

  1. CountBits : Given a positive integer n, count the total number of set bits in binary representation of all numbers from 1 to n.
  2. RightMostDifferentBit : Given two integers M and N, WAP to print the rightmost different bit in the two numbers.
  3. KthSetBit : Given a number N, check if its kth bit is set or not?
  4. BitDifference : Given two integers M and N, WAP to find the number of bits needed to be flipped to make these numbers equal.
  5. SparseNumber : Check if given number is sparse or not?
  6. MaxConsecutiveOnes : Given a number n, find length of the longest consecutive 1s in its binary representation.
  7. PowerOfTwo : Given a number n, check if can be represented as power of 2.
  8. PowerSetGenerator : Wap to generate all the subsets of a set

Recursion (io.algonomics.gfg.algos.recursion)

  1. PalindromeNumber : Given a number n, check if its palindrome or not.
  2. PhoneNumberToWords : Given a keypad as shown in diagram, and an N digit number. List all words which are possible by pressing these numbers.
  3. DecimalToBinary : Given a decimal number as input, we need to write a program to convert the given decimal number into equivalent binary number.
  4. SplitArray : Split the array into equal sum parts according to given conditions.
  5. TestDivisibility : Given three integers N, A and B, the task is to find whether N is divisible by any number that contains only A and B as it’s digits.
  6. ReverseNumber : wap to reverse a number recursively.
  7. BinaryStringGenerator : Given a positive integer number N. The task is to generate all the binary strings of N bits.
  8. NumberReducer : Given a number N. The task is to reduce the given number N to 1 in the minimum number of steps following certain operations.
  9. HandshakeCalculator : There are N number of persons in a party, find the total number of handshake such that a person can handshake only once.
  10. CountMatrixPaths : Count all possible paths from top left to bottom right of a mXn matrix
  11. FloodFill : Flood fill Algorithm – how to implement fill() in paint?

String (io.algonomics.gfg.algos.string)

  1. StringPermutations : Given a string, write a function to print all of its permutations or anagrams.
  2. SubstringGenerator : wap to generate all possible non-empty substrings of a string. ex: abc : {a,b,c,ab,bc,abc}.
  3. SubSequenceGenerator : Given a string, we have to find out all sub-sequences of it. A String is a subsequence of a given String, that is generated by deleting some character of a given string without changing its order.
  4. AllPossibleStringsOfGivenSize : Given a set of characters and a positive integer k, print all possible strings of length k that can be formed from the given set.

Dynamic Programming (io.algonomics.gfg.algos.dp)

  1. CountMatrixPaths : Count all possible paths from top left to bottom right of a mXn matrix

Arrays (io.algonomics.ds.arrays)

  1. ArraySumEqualToK : Given an array A[] and a number x, check for pair in A[] with sum as x
You can’t perform that action at this time.