Fragen im Vorstellungsgespräch: Intern in Düsseldorf

189.444

Fragen aus Vorstellungsgesprächen für „ Intern“, von Bewerbern geteilt

Top-Fragen in Vorstellungsgesprächen

Sortieren: Relevanz|Beliebtheit|Datum
Goldman Sachs
Software Engineer Intern wurde gefragt...28. Juli 2009

Suppose you had eight identical balls. One of them is slightly heavier and you are given a balance scale . What's the fewest number of times you have to use the scale to find the heavier ball?

48 Antworten

Two. Split into three groups of three, three, and two. weigh the two groups of three against each other. If equal, weigh the group of two to find the heavier. If one group of three is heavier pick two of the three and compare them to find the heaviest. Weniger

2 3a+3b+2 = 8 if wt(3a)==wt(3b) then compare the remaining 2 to find the heaviest if wt(3a) !== wt(3b) then ignore group of 2 discard lighter group of 3 divide the remaining group of 3 into 2+1 weigh those 2 If == the remaing 1 is the heaviest if !== the heaviest will be on the scale Weniger

2 weighings to find the slightly heavier ball. Step 1. compare 2 groups of three balls. Case 1. if they are both equal in weight, compare the last 2 balls - one will be heavier. case 2. If either group of 3 balls is heavier, take 2 balls from the heavier side. compare 1 ball against the 2nd from the heavy group result 1. if one ball is heavier than the other, you have found the slightly heavier ball. result 2. if both balls are equal weight, the 3rd ball is the slightly heavier ball. Easy Shmeezi Weniger

Mehr Antworten anzeigen
Google
Intern wurde gefragt...10. Dezember 2013

Find the max value in an array. The array is "semi-sorted". Here is an example: { 1 3 4 7 9 10 12 13 12 6 3 } As you can see, the array increases and then decreases at one point (13).

19 Antworten

Brute force solution can be ofcourse O(N). But we can make it better: mid = (start + end )/2 if mid > mid + 1 && mid > mid - 1 return mid else if mid mid -1 search mid -> end else if mid > mid + 1 && mid mid Weniger

It is necessary to check two elements on each side of our middle element to find out where the array increases , where decreases, and where the peak is. And only then we can guarantee something about our max. Weniger

private static int recFindPeak(int[] a, int start, int end) { if(start == end) return a[start]; int mid = (start+end)/2; if((a[mid] > a[mid+1])&&(a[mid] > a[mid-1])) return a[mid]; else if(a[mid] > a[mid-1]) return recFindPeak(a, mid+1, end); else return recFindPeak(a, start, mid-1); } Weniger

Mehr Antworten anzeigen
Goldman Sachs

Suppose we hire you, and you and the rest of the new interns decide to go buy a cup of coffee. Each intern purchases one cup of coffee. One of the interns suggests everyone play a game. Everyone will flip a fair coin, dividing the group of interns into two subgroups: those that got heads and those that got tails. The game is this: whichever group is smaller evenly splits the cost of everyone's cup of coffee (i.e. if there are 5 interns, 3 get H, 2 get T, then the two interns that got tails each buy 2.5 cups of coffee). However, nothing says you need to play this game. You can choose to buy your own cup of coffee and not play the game at all. The question: Should you play this game? (Note: You may assume that there is an odd number of interns, so there are no ties, and that if everyone gets H or everyone gets T, then everyone loses and just buys their own cup of coffee).

18 Antworten

Assume each coffee costs $1, for simplicity. So this is effectively a choice between two outcomes: paying $1 with probability 100%, or paying $0 with some probability and paying more than $0 with some probability. So you ask yourself: what is your expected cost in the second case? Give that a try and see if you can figure it out. However, I want to remind you that the question is "should you play this game?" The answer to this question isn't just a math question. If you only work out expected values, you've missed the point. For example, a separate question (with the same kind of flavor as the direction I'm trying to lead you) is this: suppose I give you a choice of two outcomes. Either you get $1 with 100% probability or I give you $500,000,000 with probability 1/100,000,000 and 0 otherwise. Which would you pick? Now what if it was the same first choice, but the second choice was $50 with prob 1/10 and 0 otherwise? Now which would you pick? These are the kinds of things you want to think about while answering this kind of question. Let me know if you have anymore questions. And if you want me to post the answer, just let me know. Weniger

The probability of winning isn't 50%. It's actually slightly above 50%, but that's not the way to look at it. The total number of coffees that need to be bought is n, where n is the number of interns. Going into this game, every intern is the same so they each have the same expected value, and the sum of the expected values must equal -n. So everyone has an EV of -1 as claimed. Weniger

I say yes. To play the game. Only because I'm prepared if I lost. The fact that I can afford to loose, makes me want to try my chance at wining Weniger

Mehr Antworten anzeigen
Amazon

non disclosure agreement

18 Antworten

I don't actually know. I mean, that's what I would do if I were amazon, but I did not read anything about them webcamming me, and I also didn't happen to notice the webcam light being on. That didn't mean it didn't happen, though. Weniger

I took the test in c++. The function interfaces were in base c, though, so it would probably look more or less identical in c or java. Weniger

Yeah, it was for me. There was few days pause between the 2nd round and the offer, so maybe they looked at other parts of my resume and decided to forgo a 3rd round for me. So I really can't say for sure that you won't have more rounds. Weniger

Mehr Antworten anzeigen
Amazon

What was one of your best achievements on a project in the past?

18 Antworten

From what i've heard and seen, just wait, following up will barely do you any good. Weniger

Hey, I just have one question out of curiosity, was the second online assessment web-cam proctored? Weniger

i heard amazon is changing their recruiting process. Many people complained that the online proctoring was an invasion of their privacy. I also had a second online assessment but it was not webcam proctored. I am assuming the recruiting process is now two online non webcam assessments then a final phone interview. My friend had that round of interviews with Amazon 2 weeks ago. Weniger

Mehr Antworten anzeigen
Amazon

DS, Algorithms.

18 Antworten

Review Leetcode, CTCI.

Hi, did you interview on Jan 27? Did the engineer ask about behavioral questions or resume questions or did they just jump right into the coding questions? Also I finished my second assessment a week ago but still didn't get a reply back. Was that normal for you? Weniger

Hi, did you interview on Jan 27? Did the engineer ask about behavioral questions or resume questions or did they just jump right into the coding questions? Also I finished my second assessment a week ago but still didn't get a reply back. Was that normal for you? Weniger

Mehr Antworten anzeigen
Jane Street
Intern wurde gefragt...22. Februar 2016

Fit questions: Why do you want to be a trader? Why should/shouldn't we hire you? Math: 1. Flip a fair coin 8 times. What's the probability that the number of heads is a multiple of 3? 2. You mentioned on your resume that your favorite author is David Foster Wallace. Estimate the number of copies of Infinite Jest that have been read cover to cover. 3. You have a 2x1x1 brick. Define the distance between two points on the brick to be the infimum of the lengths of all paths between them on the brick. What is the maximum possible distance between two points on the brick?

17 Antworten

The shortest path has length sqrt(6). sqrt(1^2 + 1^2) = sqrt(1 + 1) = sqrt(2) sqrt(2^2 + sqrt(2)^2) = sqrt(4 + 2) = sqrt(6) Weniger

If the farthest points are opposite corners, then wouldn't the shortest path be sqrt(10)? I'm not sure how you get 2*sqrt(2) Weniger

0 is a multiple of 3.

Mehr Antworten anzeigen
Meta

Given a number n, find the largest number just smaller than n that can be formed using the same digits as n.

16 Antworten

My answer did not show properly: public static int smaller(int n){ if(n less than 10) return n; int d0 = n % 10, n2 = n / 10, d1 = n2 % 10; if(d1 greater than d0) return n / 100 * 100 + d0 * 10 + d1; return smaller(n2) * 10 + d0; } Weniger

It doesn't work, please ignore it This one works: public static int smaller(int n){ int i = 1; int result = 0; while(i <= n / 10 && n / i / 10 % 10<= n / i % 10) i *= 10; if(i > n / 10) return n; int d = n / i / 10 % 10; int j, x; for(j = 1; (x = n / j % 10) >= d; j *= 10) result = result * 10 + x; result += j * x; result = result * 10 + d; for(j *= 10; j <= i; j *= 10) result = result * 10 + n / j % 10; return result + n / i / 100 * i * 100; } Weniger

# Python implementation def getSmallerNumWithSameDigits(num): strNum = list(str(num)) endI = len(strNum)-1 endDigit = strNum[endI] # Walk backwards through digits for i in range(len(strNum) - 1, -1, -1): digit = strNum[i] # If the digit is greater than the end if digit > endDigit: # Swap them strNum[endI], strNum[i] = strNum[i], strNum[endI] break # Put back into int form return int(''.join(strNum)) print getSmallerNumWithSameDigits(912345678) Weniger

Mehr Antworten anzeigen
LinkedIn

Find the second largest element in a Binary Search Tree

15 Antworten

The above answer is also wrong; Node findSceondLargest(Node root) { // If tree is null or is single node only, return null (no second largest) if (root==null || (root.left==null && root.right==null)) return null; Node parent = null, child = root; // find the right most child while (child.right!=null) { parent = child; child = child.right; } // if the right most child has no left child, then it's parent is second largest if (child.left==null) return parent; // otherwise, return left child's rightmost child as second largest child = child.left; while (child.right!=null) child = child.right; return child; } Weniger

find the right most element. If this is a right node with no children, return its parent. if this is not, return the largest element of its left child. Weniger

One addition is the situation where the tree has no right branch (root is largest). In this special case, it does not have a parent. So it's better to keep track of parent and current pointers, if different, the original method by the candidate works well, if the same (which means the root situation), find the largest of its left branch. Weniger

Mehr Antworten anzeigen
Jane Street

Two people each bids a number before throwing a 30 faced die. Whoever gets closer to the number wins and wins the amount of money equal to the number they throw. e.g I bid 15 and you bid 16. the die lands on 10 then i win 10 from you. What's the best strategy and the expected payoff.

14 Antworten

We choose 22. If our opponent plays optimally, he chooses 21.Let us see why. Clearly, he is facing a choice between 21 and 23. If he picks 23, his expexted payoff is 8/30 * 53/2 - 22/30 * 23/2 = -41/30. If he goes for 21, his expected payoff is 7/10 * 11 - 3/10 * 26 = -0.1. Note that in both cases our opponent on average loses, so he will choose 21 to minimize his loss. In this case our expected profit is his expected loss, ie on average we expect to make 0.1 per game. Weniger

What was your approach to the problem?

I think from question that first you bet, and afterwards your opponent. It's quite obvious that when you bet on one number, for example a, your opponent will bet either on a-1, or a+1, otherwise won't be optimal for him (betting on 1 or 30 isn't very smart). So for every number you bet on, you have two expected gains (depending whether your opponent chooses a-1or a+1). Because your opponent plays optimally, you are looking for number with the highest lower gain of two above-mentioned. If you choose 21, your expected gains are 231/30 and 255/30, if you choose 22 then you will have expected gains 253/30 and 234/30, so therefore choosing 22 is optimal, and your opponent chooses 21. Weniger

Mehr Antworten anzeigen
1 - 10 von 189.444 Fragen aus Vorstellungsgesprächen angezeigt

Bewerbungsfragen für ähnliche Jobs anzeigen

internshipinternshipsgsc interninternssummer intern

Glassdoor bietet 189.444 Fragen und Bewertungen von Intern-Vorstellungsgesprächen in Düsseldorf. Bereiten Sie sich auf Ihr Vorstellungsgespräch vor. Unternehmen entdecken. Traumjob finden.