Problem Statement:
Given a 2d grid containing either values either 0 or 1 where 1 represents land and 0 represents water. You have to calculate the number of total islands in the given grid. An … Read More
Interview Questions asked in Google, Microsoft, Amazon
by Dhaval Dave
Given a 2d grid containing either values either 0 or 1 where 1 represents land and 0 represents water. You have to calculate the number of total islands in the given grid. An … Read More
by Dhaval Dave
Find shortest distances between every pair of vertices in a given edge weighted directed Graph.
Input:
The first line of input contains an integer T denoting the no of test cases . Then T test … Read More
by Dhaval Dave
Given a Binary Tree, print the diagonal traversal of the binary tree
Consider lines of slope -1 passing between nodes. Given a Binary Tree, print all diagonal elements in a binary tree belonging to same … Read More
by Dhaval Dave
User entered numbers are set into array.Intermediate integer of each pair of successive elements to be printed.
Input :
Input of 1st line is number of element in array,inputs of … Read More
by Dhaval Dave
Given a rectangular grid where each cell contains some coins. You are at the first row and you want to go to the last row with the objective of collecting … Read More
by Dhaval Dave
by Dhaval Dave
Given a set T containing a list of integers and a sum S, does a subset of T exists whose sum is equal to S.
NOTE – Subset … Read More
by Dhaval Dave
Given a list of non negative integers, arrange them in such a manner that they form the largest number possible. The result is going to be very large, hence … Read More
by Dhaval Dave
Stickler thief and wants to loot money from a society of n houses placed in a line. He is a weird person and follows a rule while looting the houses and according to the rule … Read More
by Dhaval Dave
Number Theory is used a lot for solving real world problems and for the same reason It’s asked most of the time in interviews. This article marks the beginning of series of articles over Number … Read More