LeetCode Question · Jan 2025 · Bangalore

Goldman Sachs| Analyst | Bangalore

7 upvotes 1,137 views 10 replies

Question Details

Batch: 2023 College: Tier 2 (IIIT/NIT) I was contacted by a recruiter at the end of December. I sent my resume and then I was provided with the hackerrank test link. Round 1:...

Full Details

Batch: 2023
College: Tier 2 (IIIT/NIT)

I was contacted by a recruiter at the end of December. I sent my resume and then I was provided with the hackerrank test link.

**

Round 1 Hackerrank Test**
Two easy-medium leetcode questions. I solved that in 15 mins.

Then after 3-4 days I was contacted by the recuriter to appear for the CodePair round.

**

Round 2 CodePair**

There were two questions to be solved in an hour.
Question 1: Given a input string, if a substring has already occured, put a * in the place of it.

Example Input: ABCABEABE
Example Output: ABC* E *

I took more than 40 minutes to solve this and still 1 test case didn\'t pass. Interviewer tried his best to help me pass all the test case but my dumbness also has some heights.

Question 2: Given a matrix of n* m, a robot is located initially at the bottom left corner,each box has some value and robot can only move in north and east direction. Find the optimal path.

I solved this in 10 mins with all the test cases

passed.

Then we moved to the first question, with the help of the interviewer, I

passed most of the testcases but still 1 was remaining and we ran out of time.

I went blank in the interview and couldn\'t think much about the first question and as far as I know, you need to solve all the test cases to go for superday interview. I have self

rejected now. I prepared so much but failed.

Edit: Got the rejection mail.

About This Question

This is a reported interview question from a goldman sachs interview for a swe role during the oa round reported in 2025.

It covers the following topics: Matrix, Strings .

Difficulty rating: Easy