Applied through a recruiter at a career fair at my university.
Had a phone conversation with a recruiter for approximately 45 minutes. He was very friendly.
He asked some vague questions, such as:
Technical phone interview with an employee from the SE team. He was not as friendly.
The phone interview questions are listed below.
Math
What is a tautology?
Is the statement ~(X & (X | Y)) <=> ~X a tautology?
Simplify the statement ~(A <=> B).
Describe the language given by the regular expression [abc][0-9]{2}d?5+.
a) Modify the regular expression so that it accepts the string "a23".
Given the following code: java int x = 872; byte y = x;
What is the value of y?
Perform matrix multiplication on (1, 2; 3, 4; 5, 6) * (-1, 1, 3; 2, 2, 2).
a) What is the transpose of the result?
b) What is the product of the result with its inverse?
For the binary tree with depth 3, nodes {a,b,c,d,e,f,g} given left-to-right and top-to-bottom, give all the different DFS traversals of the tree (pre-order, in-order, post-order).
Programming Concepts
What is the difference between local and global scope? Why is global scope bad?
What is a static variable?
What does it mean for a function f to be O(n)?
a) If f=O(n) and g=O(n!), what is f+g?
b) If f=O(n) and g=O(n^2), what is f*g?
What is OOP in your own words? Define inheritance, polymorphism, and encapsulation.
What is the difference between a DAG and a tree?
C++
Suppose you have the base class A, a derived class B, and a function alpha which takes a parameter of type A. If you declare an object b of type B, what happens when you call alpha(b)?
Will this code compile? cpp class Bank { public int savings; } main() { Bank a; cout << a.savings; }
What value is x assigned?
cpp
#define multiply(a,b) a*b
int x = multiply(1+2, 3);
How would you prevent the multiple definition of a class?
What is the difference between using namespace std; and using std::cout;? Why are using statements generally discouraged?
There is a base class Person and derived class Student, each has a greet() method. What is the result of the following code?
cpp
Person * myPtr = new Student();
myPtr->greet();
How would you declare an array of ints, for which the size is determined at runtime by the user?
a) How would you declare the array if the size is unknown, and the user inputs values in a while loop until a newline character is reached?
How would you write a C++ program called replace that takes in two chars from the command line, asks the user to input a string, replaces all occurrences in the string of the first char with the second char, and prints the result to the screen?
Java
How would you represent a fixed set of constants like the days of the week or suits in a deck of cards?
What is the difference between int and Integer? Why would you use Integer over int?
What is the difference between JDK, JRE, and JVM? a) Explain how the JVM achieves platform independence.
Describe how a Java program is converted from high-level code to low-level code.
Your friend writes this function. What are your concerns? java public static int divide(int[] A, int x) { try { return A[1] / x; } catch(Exception e) { return -1; } }
The following metrics were computed from 148 interview experiences for the MathWorks Software Engineer role in United States.
MathWorks's interview process for their Software Engineer roles in the United States is extremely selective, failing the vast majority of engineers.
Candidates reported having very good feelings for MathWorks's Software Engineer interview process in United States.