Engineer Interview Questions in San Jose, CA | Glassdoor

# Engineer Interview Questions in San Jose, CA

Engineers are responsible for designing and building products. In an interview context, expect to be quizzed on your technical skills, and also evaluated for your ability to work as a part of a team to get things built. The specific questions you are asked will depend on what type of engineering position you are looking for. Try a specific engineering discipline, such as software engineer, electrical engineer, or mechanical engineer.

## Top Interview Questions

Sort: RelevancePopular Date

### Software Engineer at Apple was asked...

Jun 19, 2012

Jul 18, 2010
 Write some pseudo code to raise a number to a power.11 Answerspretty trivial...int raise(num, power){ if(power==0) return 1; if(power==1) return num; return(raise(num, power-1)*num); }double Power(int x, int y) { double ret = 1; double power = x; while (y > 0) { if (y & 1) { ret *= power; } power *= power; y >>= 1; } return ret; }Show More ResponsesIn Ruby: def power(base, power) product = 1 power.times do product *= base end product end puts "2^10 = 1024 = #{power(2,10)}" puts "2^0 = 1 = #{power(2,0)}" puts "2^1 = 2 = #{power(2,1)}"If I were an interviewer, I would ask the Aug 29, 2010 poster why he used bitwise operators, and whether he would deploy that code in a production environment, or if he merely wanted to demonstrate, for purposes of the interview, that he understands bitwise operations.Because it uses dynamic programming and is lots more efficient than your algorithm.If the power is not integer, use ln and Taylor seriesIf I'm the interviewer, none of above answers is acceptable. What if y < 0? what if y < 0 and x == 0? I'm seeing an endless recursion that will eventually overflow the stack, and the none-recursive one just simply returns 1.There is a way to do this in a logN way rather than N. function power(x, n) { if n == 1 return x; // Even numbers else if (n%2 == 0) return square( power (x, n/2)); // Odd numbers else return power(x, n-1); } This is from Programming pearls.. interesting way.small mistake function power(x, n) { if n == 1 return x; // Even numbers else if (n%2 == 0) return square( power (x, n/2)); // Odd numbers else return power(x, n-1) * x; }# Solution for x ^ n with negative values of n as well. def square(x): return x * x def power(x, n): if x in (0, 1): return x if n == 0: return 1 if n < 0: x = 1.0 / x n = abs(n) # Even number if n % 2 == 0: return square(power(x, n/2)) # Odd number else: return x * power(x, n - 1) print ("0 ^ 0 = " + str(power(0, 0))) print ("0 ^ 1 = " + str(power(0, 1))) print ("10 ^ 0 = " + str(power(10, 0))) print ("2 ^ 2 = " + str(power(2, 2))) print ("2 ^ 3 = " + str(power(2, 3))) print ("3 ^ 3 = " + str(power(3, 3))) print ("2 ^ 8 = " + str(power(2, 8))) print ("2 ^ -1 = " + str(power(2, -1))) print ("2 ^ -2 = " + str(power(2, -2))) print ("2 ^ -8 = " + str(power(2, -8)))

Sep 6, 2010

Jan 21, 2010

### Product Design Engineer at Apple was asked...

Sep 21, 2011
 What are the different ways you can you tell if this part is steel or aluminium.4 AnswersSimply by using a magnet, Steel has metallic properties, and the magnet will connect. Aluminium will do nothing.Many stainless steel alloys are not magnetic, so if your magnet is attracted to the material you will definitely know it is steel, but if it doesn't you will not know what the material is.Simple methods would be density (feeling the mass of the object), surface finish (color, texture). If coated that may give you the answer i.ie anodized would indicate aluminium. For more information I would go for EDX( Energy-dispersive X-ray spectroscopy) and possible a cross section to look at the grain structure.Show More ResponsesBy far the easiest way is to test for material properties. -density -hardness -modulus of elasticity I would choose hardness. Strike each item with an equal force, which one deforms more? Thats aluminum. You could probably pull this test off with a hammer. The simplest solutions is always the best.

### Product Design Engineer at Apple was asked...

Jun 13, 2016
 What are 5 different variables of a coil spring you can change to affect spring force?3 AnswersMaterial, wire diameter, wire cross sectional shape, coil diameter, coil length5 different variables that can affect the springs force. 1.) Wire length 2.) Coil pitch 3.) Wire cross-sectional shape 4.) Material of the coil 5.) Coil diameter1. WD 2. OD 3. Active coils 4. Material 5. Free Height

Mar 18, 2009
 Implement a binary tree and explain it's function4 AnswersBinary Search tree is a storage data structure that allows log(n) insertion time, log(n) search, given a balanced binary search tree. The following implementation assumes an integer bst. There's a million implementations. Just look on wikipedia for search and insert algorithms.Hi Xin Li, A binary tree is not the same as binary search tree.. A binary tree is a tree in which every node has atmost two children nodes. It is a k-ary tree in which k=2. A complete binary tree is a tree in which all nodes have the same depth.The fact is ttttttt t t. T to t. To. A a aaAs Sdsassss.Show More Responses One or more comments have been removed. Please see our Community Guidelines or Terms of Service for more information.

### Computer Vision/Machine Learning Software Engineer at Gauss Surgical was asked...

Jun 17, 2014
 Why does one use MSE as a measure of quality. What is the scientific/mathematical reason for the same?3 AnswersMean-Square error is an error metric for measuring image or video quality it is popular video and image quality metric because the analysis and mathematics is easier with this L2-Norm metric. Most video and image quality experts will agree that MSE is not a very good measure of perceptual video and image quality.The mathematical reasoning behind the MSE is as follows: For any real applications, noise in the readings or the labels is inevitable. We generally assume this noise follows Gaussian distribution and this holds perfectly well for most of the real applications. Considering 'e' follows gaussian distribution in y=f(x) + e and calculating the MLE, we get MSE which is also L2 distance. Note: Assuming some other noise distribution may lead to other MLE estimate which will not be MSE.MSE is used for understanding the weight of the errors in any model. This helps us understand model accuracy in a way that is helpful when choosing different types of models. Check out more answers on InterviewQuery.com

### Mechanical Engineer at Tesla was asked...

Sep 7, 2015
 Asked how the strength to weight ratio of aluminum and steel compared.3 Answersstrength-to-weight ratio in typically the material's strength (which is force per unit area upon failure) divided by its density. Aluminum has a tensile strength of 572 MPa and a density of 2.81 g/cm^3 which computes to . Steel, on the other hand has a tensile strength of 505 MPa and a density of 8.00 g/cm^3. So, as can be seen, aluminum has a higher strength-to-weight ratio than steelStrength to weight ratio can be defined properly by the Yield strength (which defines the maximum stress that a material can handle before plastic deformation) to Density (mass/volume). Aluminum (6061) yield strength : density is 250MPa : 2080 kg/m^3 Stainless Steel cold rolled yield strength : density is 500MPa : 8000kg/m^3 For the same volume of material, the ratios are 1/8 for aluminum to 1/16 for stainless steel. You're getting twice as much the amount of strength on the aluminum per given volume than on the steel.Other two answers here are kinda wrong and honestly I think they're missing the point of the question. Strength is entirely dependent on alloy. Some aluminum alloys will have a higher strength/weight than some steel alloys, and vice versa. Unless the interview specifies specific alloys, you really can't make a blanket statement about "steel vs aluminum." You can, however, make general statements about stiffness. Almost all the densities and elastic moduli of aluminum or steel are nearly constant across the alloys, and actually for straight tension they have very similar stiffness/weight. The difference comes in bending. The same weight of aluminum has a much large cross section, and therefore a much larger moment of inertia, so an aluminum beam in buckling or bending will be stiffer than steel. Hope this helps.