Skip to content
Gblog Must Do Coding Questions for Product Based Companies
As the placement season is back, GeeksforGeeks is here to help you crack the interview. We have selected some most commonly asked and MUST DO… Read More
Given a square matrix (N X N), the task is to find the maximum XOR value of a complete row or a complete column.Examples :  … Read More
Methods discussed in this post: BitSet class methods. / / | | \ \ set() xor() clone() clear() length() cardinality() We strongly recommend to refer… Read More
A n digit number x is called Keith number if it appears in a special sequence (defined below) generated using its digits. The special sequence… Read More
Lucas numbers are similar to Fibonacci numbers. Lucas numbers are also defined as the sum of its two immediately previous terms. But here the first… Read More
Given a binary string, that is it contains only 0s and 1s. We need to make this string a sequence of alternate characters by flipping… Read More
Given two strings in lowercase, the task is to make them anagram. The only allowed operation is to remove a character from any string. Find… Read More
Given a square matrix of size N*N, where each cell is associated with a specific cost. A path is defined as a specific sequence of… Read More
Difficulty level : IntermediatePredict the output of following Java Programs.Program 1:  Java class GfG {     public static void main(String args[])     {         String s1 = new… Read More
Prerequisites:  Image Processing in Java – Read and Write Image Processing In Java – Get and Set Pixels Image Processing in Java – Colored Image… Read More
Find the Smallest number (Not leading Zeros) which can be obtained by rearranging the digits of a given number.  Examples:  Input: n = 846903 Output:… Read More
Given an integer n, find the nth Pentagonal number. The first three pentagonal numbers are 1, 5, and 12 (Please see below diagram). The n’th pentagonal… Read More
The URL class is the gateway to any of the resource available on the internet. A Class URL represents a Uniform Resource Locator, which is… Read More
The range() and xrange() are two functions that could be used to iterate a certain number of times in for loops in Python. In Python… Read More
Difficulty level : Intermediate Predict the output of the following Python Programs. Program 1: nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv']    print nameList[1][-1] Output: k… Read More
Given a string the task is to print all distinct sub-strings of length two in the given string. All substrings should be printed in lexicographical… Read More

Start Your Coding Journey Now!