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.
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:
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:
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.