Sse Interview Questions

1,105 sse interview questions shared by candidates

Problem Statement - Counting Cells in a Sector Consider a two-dimensional grid of cells, each of which may be empty or filled. The filled cells that are connected form a sector. Two cells are said to be connected if they are adjacent to each other horizontally, vertically or diagonally. There may be several sectors on the grid. Your job is to find the largest sector (in terms of number of cells) on the grid. The following figure illustrates a grid with 3 sectors (the largest contains 5 cells). Problem Write a program that determines the size of the largest sector for a given grid. Input The input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This line is followed by a blank line, and there is also a blank line between two consecutive inputs. The grid is given as a set of string, each composed of 0s and 1s. The 1 indicates that the cell is filled and 0 indicates an empty cell. The strings should be converted into the grid format. The largest grid that should be considered is a 25x25 grid. Output For each test case, the output must follow the description below. The outputs of two consecutive cases will be separated by a blank line. The output is the size of the largest sector found on the grid. Sample Input 2 11000 01100 00101 10001 01011 1011 1010 Sample Output 5 3
avatar

SSE

Interviewed at Progress

3.8
Dec 24, 2010

Problem Statement - Counting Cells in a Sector Consider a two-dimensional grid of cells, each of which may be empty or filled. The filled cells that are connected form a sector. Two cells are said to be connected if they are adjacent to each other horizontally, vertically or diagonally. There may be several sectors on the grid. Your job is to find the largest sector (in terms of number of cells) on the grid. The following figure illustrates a grid with 3 sectors (the largest contains 5 cells). Problem Write a program that determines the size of the largest sector for a given grid. Input The input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This line is followed by a blank line, and there is also a blank line between two consecutive inputs. The grid is given as a set of string, each composed of 0s and 1s. The 1 indicates that the cell is filled and 0 indicates an empty cell. The strings should be converted into the grid format. The largest grid that should be considered is a 25x25 grid. Output For each test case, the output must follow the description below. The outputs of two consecutive cases will be separated by a blank line. The output is the size of the largest sector found on the grid. Sample Input 2 11000 01100 00101 10001 01011 1011 1010 Sample Output 5 3

Viewing 1 - 10 interview questions

Glassdoor has 1,105 interview questions and reports from Sse interviews. Prepare for your interview. Get hired. Love your job.