Given a integer matrix of odd dimensions (3 * 3, 5 * 5). then the task is to find the sum of the middle row… Read More »

Given a number, check if it is perfect square or not. Examples: Input : 2500 Output : Yes 2500 is a perfect square. 50 *… Read More »

Loop Invariant Condition: Loop invariant condition is a condition about the relationship between the variables of our program which is definitely true immediately before and… Read More »

Given a set (HashSet or TreeSet) of strings in Java, convert it into an array of strings. Input : Set hash_Set = new HashSet(); hash_Set.add(“Geeks”);… Read More »

Given a sentence str. The problem is to remove all the palindromic words from the given sentence. Examples: Input : str = “Text contains malayalam… Read More »

You are given two positive integer n and k. You have to calculate the maximum possible XOR value of at most k-elements from 1 to… Read More »

Given a square matrix, swap the element of major and minor diagonals. Major Diagonal Elements of a Matrix : The Major Diagonal Elements are the… Read More »

Given time in hours, find the time in minute at which the minute hand and hour hand coincide in next one hour. Examples : Input… Read More »

Given first term (a), common ratio (r) and a integer N of the Geometric Progression series, the task is to find Nth term of the… Read More »

Given an array of size n of integers in range from 1 to n, we need to find the inverse permutation of that array. An… Read More »

Given the side of a square then find the area of a Circumscribed circle around it. Examples: Input : a = 6 Output : Area… Read More »

Given an array of size N-1 and the mean of N elements (one element is not given). We need to find the missing value X… Read More »

We have a sorted array with duplicate elements and we have to find the index of last duplicate element and print index of it and… Read More »

Nothing hard as such was asked in ZOHO off campus recruitment held in January. Most of the question are from pointers and arrays types. For… Read More »

Given a tree, print the level order traversal in sorted order. Examples : Input : 7 / \ 6 5 / \ / \ 4… Read More »

Find the sum of number of series after dividing the element of array from previous element. Examples: Input : 3 7 9 10 12 18… Read More »

Given two strings, how to check if the two strings are equal or not. Examples: Input : ABCD, XYZ Output : ABCD is not equal… Read More »

Given a string ‘s’ and an integer k, find other string ‘t’ such that ‘t’ is the largest subsequence of given string ‘s’ and each… Read More »

Given an array of n distinct elements, count total number of subsets. Examples: Input : {1, 2, 3} Output : 8 Explanation the array contain… Read More »

The time.h header defines four variable types, two macro and various functions for manipulating date and time. A brief description of the variable types defined… Read More »