Software Engineer In Test Interview Questions in New York City, NY | Glassdoor

Software Engineer In Test Interview Questions in New York City, NY

87

Software engineer in test interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Given a 2D rectangular matrix of boolean values, write a function which returns whether or not the matrix is the same when rotated 180 degrees. Additionally verify that every boolean true is accessible from every other boolean true if a traversal can be made to an adjacent cell in the matrix, excluding diagonal cells. That is , (x , y ) can access the set [ ( x + 1 , y ) , ( x - 1 , y ) , (x , y - 1 ) , (x , y + 1 ) ] For example, the matrix { { true , false } , { false , true } } should not pass this test.

4 Answers

if the matrix A is a11, a12 a21, a22 after 180 rotation a22, a21 a12, a11 so a11 == a22 and a12 == a21 function is BOOL isSame = (a11==a22) && (a12==a21) done.

public static boolean isMatrixEqualToFlip(boolean[][] matrix) { if (matrix==null || matrix.length == 0 || matrix[0].length == 0) { return true; } int rowlen = matrix[0].length; int highInd = matrix.length/2; int lowInd = highInd - 1 + (matrix.length % 2); System.out.println("rowlen: " + rowlen + " high: "+ highInd + " low: " + lowInd); while (lowInd >= 0) { System.out.println("high: " + highInd + " lowInd: " + lowInd); for(int i=0; i < rowlen; i++) { System.out.println("Compare " + matrix[highInd][i] + " to " + matrix[lowInd][rowlen - 1 - i]); if (matrix[highInd][i] != matrix[lowInd][rowlen - 1-i]) { return false; } } lowInd--; highInd++; } return true; }

def rotate180(mtx): col=mtx col.reverse() for row in col: row.reverse() print col

They asked to code a question and design test cases for it. They asked me not to share the question.

1 Answer

Write a function that accepts a string and a regular expression, and return true if the string contains a match.

1 Answer

Write a function that finds the lowest common ancestor between two nodes in an n-ary tree

1 Answer

Q>> Write a function that checks if an array of squares can be rotated /arranged in a way so that all squares have same color in top and same color in bottom The function returns a boolean value true if the squares can be aligned else returns a false.

1 Answer

Design a cellphone for a blind person

1 Answer

Describe a technical problem you faced in the past and how you overcame it.

First round was generic profile questions followed by algorithms.