Skip to main content

Featured

Dhadi Game - An Indian War game

Hi Friends, Today i will introduce an indian traditional board game to android user I am very interested in playing dhadi game with my friends. Now that interest  becomes as an android game Here these are the playing instructions to the dhadi game Dhadi is a traditional indian game with two players.It runs with mind power between 2 players.You can play against your friends Features: Auto Move Suggestions Interesting Graphic View to game Time taken by two players will be shown individually Total movements shows Intresting background sounds and music music and sound on/off feature No permissions are needed to this app. Download the best Dhadi for Android now! https://play.google.com/store/apps/details?id=in.mjtech.daddy

An Army Helicopter problem

An Army Helicopter
The host government has promised that in addition to the security guards in each match, there will be a platoon of elite commandos that will be deployed for extra protection in each stadium for each match. In order to move quickly between cities and stadiums there will be a dedicated army helicopter on permanent stand by.

The army helicopter has to land in city (rectangular area) which contains several towers (mobile communication towers). For the safe landing of the helicopter, the landing space must not contain any tower in the landing space. A helicopter needs a square shaped landing area which has the side length greater than or equal to the helicopter length. Given a description of the tower positions of the city, you have to tell the largest helicopter that can land in the city.


Input Format:

You will be given a function which contains a string array of N length, each string contains symbols (either 'x' or 'o'). x represents a tower and 'o' represents empty space.

Output Format:

Your function will return the Length of the largest helicopter that can land in the city, else -1 if input is invalid.


Sample Test Case 1:
Sample Input:
5
x#o#o#o#x#o
x#o#o#o#x#x
x#o#o#o#x#x
x#o#x#o#o#x
x#o#x#o#o#x

Sample Output :
3


Sample Test Case 2:
Sample Input:
4
x#o#o#o#x#o
x#o#o#o#x#x
x#x#x#o#x#x
x#o#x#o#o#x

Sample Output :
2

You can write solution in any programming language...

Comments

Popular Posts