Goldman sachs || Associate || Rejected
Anonymous User
7266

Current Experience: 3 year+ at a product based finance MNC

Recently i appeared for Goldman sachs associate role. Recruiter reach out to me.

There were total of four rounds for me.

OA round: Hackerrank
Two easy to medium level question was there on hackerrank platform. Time was 2 hour but was able to solve both questions much before that.

First round: Coderpad
It was one hour round. It started with introduction then asked two coding questions in below sequence.
In this round they were supposed to ask one medium-hard and one medium DSA questions.

  1. https://leetcode.com/problems/target-sum/description/. I gave brute force exponential solution then did top down dp to make it O(nsum) but then interviewer was expecting more optimizated solution which i could not. Coded O(nsum) because of time contraint.
  2. Variation of this https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing/description/ where instead of one element we can delete one subarray. Just discussed the approach because we did not left with time to code.

Superday interviews I gave superday in fever because I only had 1 month notice period left and i heard GS take around a month to release offer letter so i did not reschedule. I felt I lacked concentration a bit in interview because of fever. Idk it was my bad decision or god plan. So be mindful in choosing superday.
Second round: Data structures
It was one hour round. A Panel of two interviewers were there. They started with introduction.
Then they asked two coding questions in sequence:

  1. Given map<child,parent> representing graph edges, find root of tree having maximum number of nodes. I gave Time O(E) and Space O(min(V,E)) solution but she was expecting more optimization and said will discuss later but in interest of time I coded O(E) solution but i did mistake to return maximum number of nodes instead of root of that which she pointed in the interview end.
  2. https://leetcode.com/problems/sliding-window-maximum/description/ This was known question to me I gave brute force O(n*k) solution and later optimized it to O(n) with sliding window approach. But struggled a bit while running and debugging. Second interviewer was friendly and gave couple of extra minutes and i was able to run the code successfully.

Third round: Software engineering practice
It was one hour round. A Panel of two interviewers were there. It started with introduction from both sides.
Then they asked following in sequence:

  1. Given an array, return true if there exists a triple of indices (i, j, k) such that i < j < k and nums[i] < nums[k] < nums[j] otherwise return false. I started with brute force O(n^3) then gave O(n^2) solution but he expected more optimization which i could not. I coded the O(n^2) solution but he ran the code in the end of interview and it failed because of one negligible check which i pointed, he seems statisfied.
  2. Second interviewer was very experienced, he asked known SnakeLadder LLD, I wrote few classes and also wrote code logic for play, he was almost statisfied but he said it wont work in distributed enrviroment and he was expecting the logic in event way that one event should trigger another event which i could not get. I should have ask in the end what he is expecting exactly but i did not ask thinking it may go other way round.

There were two more rounds namely Software Design and Architecture and Hiring Manager Round but I got rejected after Software engineering practice which i did not expect.

Let me know how SnakeLadder LLD can be done in events so that it will work in distributed environment.
Below logic I gave of course without logs:

public void game() throws InterruptedException {
	Deque<Player> playerQueue = new LinkedList<>(this.players);
	Queue<Player> winnerQueue = new LinkedList<>();

	while (playerQueue.size() > 1) {
		Player curPlayer = playerQueue.pollFirst();
		System.out.println(curPlayer.getName() + " turn");
		System.out.println("\tRolling dice...");
		int move = this.diceService.rollDice();
		System.out.println("\tDice gave " + move);
		int nextPos = curPlayer.getPosition() + move;
		System.out.println("\tReached " + nextPos);
		Jump jump = this.board.isSnakeOrLadderPresent(nextPos);
		if (jump != null) {
			jump.getEncounterMessage();
			nextPos = jump.getEnd();
		}

		int boardEnd = this.board.getDimension() * this.board.getDimension();
		if (nextPos == boardEnd) {
			curPlayer.setPosition(nextPos);
			System.out.println("\tFinally at " + nextPos);
			System.out.println("\t=========== HURRAY WON ==============");
			winnerQueue.add(curPlayer);
			continue;
		} else if (nextPos < boardEnd) {
			curPlayer.setPosition(nextPos);
			System.out.println("\tFinally at " + nextPos);
		}
		if(move==diceService.getMaxDiceValue()){
			System.out.println("\tGot chance again");
			playerQueue.addFirst(curPlayer);
		}else{
			playerQueue.addLast(curPlayer);
		}

		Thread.sleep(1000);
	}
	winnerQueue.add(playerQueue.pollFirst());

	//print winner queue
}

Badest part is I didn't get feedback I tried getting feedback over email but did not get response, also i tried calling hr but calls are getting rejected.

Hope it will help others. All the best champs.

Note:
One solution which is coming in my mind is may be we can use something like choreography design pattern where we will put one event on one kafka topic(or any other message broker) from where next service(may be like diceService, boardService or gameService) can pick, process and put next event on other kafka topic next service is listening to. May be we use library like KStream for this usecase. We can achive same with one kafka topic as well, segregating different event based on kafka header. During interview i could not think of distributing this small code piece.

Comments (10)