Given three numbers a, b and c such that a, b and c can be at most 1016. The task is to compute (a*b)%c A simple… Read More
We are given queue data structure, the task is to implement stack using only given queue data structure.We have discussed a solution that uses two… Read More
Recently ZOHO visited our campus for recruitment and i would like to share my experience. Thanks to geeksforgeeks which contributed to most of my preparations..… Read More
Most of the times, in competitive programming, there is a need to assign the variable, the maximum or minimum value that data type can hold,… Read More
Transpose of a matrix is a task we all can perform very easily in python (Using a nested loop). But there are some interesting ways… Read More
In the case of arrays, there is not much choice to copy an array into another, other than the iterative method i.e running a loop… Read More
Jay was an old friend of Rakesh and was coming to visit him from a small town. Jay came over late. When Rakesh asked… Read More
Heap’s algorithm is used to generate all permutations of n objects. The idea is to generate each permutation from the previous permutation by choosing a… Read More
Given a binary tree and a node, print all cousins of given node. Note that siblings should not be printed.Example: Input : root of below… Read More
Void functions are known as Non-Value Returning functions. They are “void” due to the fact that they are not supposed to return values. True, but… Read More
Given a number n, find the cube root of n.Examples: Input: n = 3 Output: Cubic Root is 1.442250 Input: n = 8 Output: Cubic… Read More
Given a string containing many consecutive spaces, trim all spaces so that all words should contain only a single space between them. The conversion should… Read More
Given three integers a, b and c where c can be either 0 or 1. Without using any arithmetic, relational and conditional operators set the… Read More