Problem Statement:
You are given 3 types of parentheses (),{},[]. Now you are supposed to check whether a given string containing some parentheses is closed or not.
Interview Questions asked in Google, Microsoft, Amazon
by Dhaval Dave
by Dhaval Dave
by Dhaval Dave
You are given a string T which consists of 0’s and 1’s. Now you input two non-empty strings U and V. Then your task is to match the Regular Expression – U*V with the given … Read More
by Dhaval Dave
Knight Tour Problem : Given a chess board of size n x n, initial position of knight and final position of knight. We need to find the minimum number of steps required to reach final … Read More
by Dhaval Dave
Consider a binary matrix as shown in the figure below. You need to find the maximum size of square sub matrix with all 1’s.
… Read Moreby Dhaval Dave
Given two strings x and y, What is the cheapest possible way to convert x into y where following operations are allowed to perform –
by Dhaval Dave
Skiing on Mountains Matrix : “John Snow” likes Skiing on Mountains a lot.That’s not very surprising, since skiing is really great. The problem with skiing is one have to slide downwards to gain speed. Also … Read More
by Dhaval Dave
Trapping Rain Water or Water collected between towers : Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after … Read More
by Dhaval Dave
The greedy coins game Dynamic Programming Solution :
Question statement There is a row of 2n coins on the table; each coin can have any positive integer value. Two players alternate turns.
On a player’s … Read More
by Dhaval Dave
In a Binary Search Tree (BST), all keys in left subtree of a key must be smaller and all keys in right subtree must be greater. So a Binary Search Tree by definition has distinct … Read More