Preguntas de entrevista de Ingeniero iii

2 mil

Preguntas de entrevista para Ingeniero Iii compartidas por los candidatos

Principales preguntas de entrevista

Ordenar: Relevancia|Popular|Fecha
Amazon
A un Software Development Engineer III le preguntaron...17 de julio de 2012

Telephone interview: Find largest integer from an array of integers. The integers in the array are arranged in strictly increasing (no 2 integers are same) or strictly increasing then decreasing; so like a curve and you have to find the peak. Discuss time complexity. Write code.

4 respuestas

The question is a variation of the commonly asked problem of finding the start/end index of a sorted array that has been rotated. Takes O(log n) time. Menos

You can solve this question using ternary search

First, binary search will not work since just looking at a single point will not tell you if it's on the decreasing or increasing side of the curve. What you need is modified binary search. Looking at position i check position i+1 if it's increasing then search right otherwise search left; Code: int peak(vector V, int i, int iStart, int iEnd){ assert( i >= 0 && i = 0 && iStart = 0 && iEnd < V.size()); assert( iStart <= i && i <= iEnd ); if (i == iEnd) return i; int iCurr = V[i]; int iNext = V[i+1]; int iStartNew = iStart; int iEndNew = iEndl if( iCurr < iNext ) iStartNew = i; else iEndNew = i; int iNew = (iEndNew-iStartNew)/2; if( iNew == i ) iNew++; return peak(V, iNew, iStartNew, iEndNew); } Menos

Mostrar más respuestas
General Atomics

phone screen question: what is the derivative of veloctiy?

4 respuestas

Acceleration

Guys...the (time) derivative of velocity is, without a doubt, acceleration.

dx/dt; delta of distance over delta of time

Mostrar más respuestas
Honeywell

Technical Manager = What are you doing? How much are you willing to contribute? etc. This is mostly behaviour round. HR = Again, straight forward questions. Technical = this round contains two coding test. You will work as a team with some other candidate on a test. Basically, you have to demonstrate your teamwork skills. Also, how well you handle the situation e.g. are you a follower or a leader etc.

4 respuestas

Hi, Can you share what kind of questions were asked in the 1st technical test?

Well first round was basic OOPS knowledge. Since it's been more than 2 months, I do not exactly recall all the questions but it was straight forward. Menos

Regarding main face to face interview, I've already mentioned two questions in my original post. Menos

Mostrar más respuestas
Google

Return k smallest element in a tree

4 respuestas

DFS inorder return first k visited nodes (using auxiliary array)

using a rather complicated recursion.

look number of values on the left of the current node, if adding this node we get k - this is the node we are looking for. Menos

Mostrar más respuestas
Google

given rand5() that return 1-5 uniformly produce rand7() that returns 1-7 uniformly

4 respuestas

int S=0; int i; for (i=1, i<=5, i++) S=S+rand5(); return ( S % 7) + 1; S spans 5 to 25 (inclusive, which are 21 values evenly/uniformly spread) Menos

The above solution (with the sum) is not correct because, for example, you have several “options” to get to a sum of 6 (1+2+1+1+1, 2+1+1+1+1 etc...), but only one option to get to a sum of 5 (get 1 five times). So the 5 to 25 range is not evenly distributed. You are more likely to get certain numbers. So the rand7 does not return 1-7 uniformly. Menos

int a = rand5(), b = rand5() while (a*5 + b < 10) {a = rand5(), b = rand5()} return (a*5 + b) % 7 Menos

Mostrar más respuestas
USAA

You climb a 60 foot tree and have the ability to span up to 3 feet at a time. What's the minimum number of branches you'd have to touch to get the top?

3 respuestas

Not enough information. No idea how many branches there are or what is the location of each one. And what kind of tree could you scale all the way to the top while fully supporting your weight? Was this a 100-foot tree that was cut off after 60 feet? Menos

20 branches

Divide 60 by 3.

PayPal

Explain this: var Bob = { name: "Bob", name_fn: function(){ return this.name; } } console.log(Bob.name_fn()) //"Bob" var fn = Bob.name_fn console.log(fn()) //undefined

3 respuestas

when you call fn() its scope is in global. The function call should be scoped properly to work. You should use call or apply to make it work. Menos

It's essential to demonstrate that you can really go deep... there are plenty of followup questions and (sometimes tangential) angles to explore. There's a lot of Software Engineer III experts who've worked at PayPal, who provide this sort of practice through mock interviews. There's a whole list of them curated on Prepfully. prepfully.com/practice-interviews Menos

fn is "Bob" and not a method.

Google

given list[list[String], where each list[String] represents a node in the following manner: node.id -> child0.id -> child1.id -> ... rebuild the tree.

3 respuestas

Using a HashMap to store existing id's

Didn't get the question. list[String] will have nodes all the way down to the leaf or just one or two immediate children ? Menos

I would use a HashMap , A, for node.id -> Node Object. Meaning that when reading a line I would create a Node Object with the given id. And child Id which appears in this map (A) I will add a pointer to it from the parent. If the child id is missing, then I will add the parent to another HashMap, B, which stores child.id -> [List of parents]. So that actually when reading a line and creating a new Node, I will also look at HashMap B, and update all it's parents (and remove them from map B). Menos

Juniper Networks

Write a pgm to find out if call stack address is increasing or decreasing

3 respuestas

@M: it's a pretty common question irrespective of the nationality of the interviewer. I was asked the same question by a Caucasian guy at a different firm and I didn't get the job - not because of my (or his) nationality, but because I wasn't technically strong enough. Menos

M. I am here in states and am Indian and I bet you have no idea how difficult Indian interviewers are! If you are an Indian and he is Indian too, he would give you a benefit of doubt! Yes some of us are like that, but I guess every where there are some folks like that! Cheers! Menos

what kind of entrance exam? Such stupid interview, guess pretty much like those in India. My expereince was if interviewer & candidate are from India, no such testing etc. If interviewer is from India and candidate is of other nationality, yes, because that will give the interviewer an excuse not to hire. Menos

Amazon

First phone screen: Print all the nodes of a tree in reverse level order (ie print all the nodes at the leaves first, then print the nodes on the level above the leaves, and then eventually work your way to the top).

3 respuestas

The above answer is wrong, consider the tree below: 10 / \ 5 15 / \ 12 25 The post order traversal is 5, 12, 25, 15, 10 but the answer should be 12, 25 (or 25, 12), 5, 15 (or 15, 5) and 10 The correct solution would be to do a BFS from the room using a queue. After visiting a node, add it to a stack and continue. When done the traversal, loop the stack popping elements and printing to screen. Menos

Do an in level order traversal and place each node visited into a stack. Then, pop each element from the stack. The elements will pop out in the reverse order. Menos

With no additional restrictions, this sounds as though it is simply a post-order traversal of the tree. Menos

Viendo 1-10 de 1573 preguntas de entrevista