Tip 1: Goldman Sachs emphasizes problem-solving skills, so focus on algorithms such as Sliding Window, Two Pointers, Prefix Sum, Linked Lists, Stacks and Queues, Trees and Graphs, Dynamic Programming, and Binary Search.
Tip 2: SDE-2 roles require strong system design knowledge. Therefore, I focused on High-Level System Design, Low-Level Design, Databases and Caching, Concurrency, and Distributed Systems.
Tip 3: Since I have experience with Java and Spring, I also prepared topics such as Multithreading and Concurrency, JVM Internals (Garbage Collection, Memory Model), Spring Boot and Microservices, and Database Optimization (Indexing, Transactions, Query Optimization).
Tip 1: Include relevant keywords from the job description (Java, Spring, REST, Microservices, AWS, System Design, etc.).
Tip 2: Add a Projects section and have a hands-on understanding of the projects mentioned.
Timing: Anytime during the day; the test was active for 3 days.
Environment: It could be taken at home on a personal laptop with the camera on.
Given a stream of packets, you can process only 10 packets per second. However, more than 10 packets may arrive within a second. Suggest an appropriate data structure or algorithm to handle this scenario.
We can use the Sliding Window approach here. There are two things to keep in mind: first, how to maintain a 1-second time interval, and second, ensuring that the window size does not exceed 10. While processing the packets, we need to save the start time of each interval. That is, if a packet arrives within the 1-second time interval from the start time and the count is less than 10, we process it; otherwise, if the count exceeds 10, we ignore it.

We create a 2D DP array of the same size as the input grid.
Base Case: The value at (0, n-1) is the same as grid[0][n-1], since there’s no movement beyond this point.
Filling the DP Table: Start from (0, n-1) and move backwards toward (m-1, 0) using the transition formula.
It was an online video call interview. The interviewer and I joined the call via a Google Meet invite link. He asked me questions about my résumé, the projects I had worked on, and a few Java basics. Then we moved on to a coding question, which I had to solve in CoderPad.



Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]
Output: 3.5
Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Tip 1: Get hands-on experience with data structures such as min heap, max heap, etc.
Tip 2: Have a strong command of your programming language to effectively use its internal libraries.
The interview was scheduled from 3 PM to 4 PM. The interviewer was very friendly and began by discussing basic details about my current job and the projects I’m contributing to. He asked about any optimizations I had implemented in my project, which I was able to answer well, as I had optimized one of the most frequently occurring database-related issues. We then moved on to database concepts such as indexing, normalization, SQL, and NoSQL. The interview concluded with a simple problem-solving round where he gave me a coding question.



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
Gave 3 approaches:
1. Brute Force (O(n²)): Check left and right max for each bar.
2. Dynamic Programming (O(n) time, O(n) space): Precompute left and right max arrays.
3. Two-Pointer Technique (O(n) time, O(1) space): Efficiently calculate trapped water using two pointers.
The interview was held from 4:30 to 5:30 PM. It was a System Design round. The interviewer first introduced himself and explained what was expected of me in the role. We then quickly moved on to designing a movie ticket booking system.
Design a system similar to BookMyShow.
Tip 1: Get well-versed with common design patterns such as Decorator, Adapter, Factory, and Proxy.
Tip 2: Have a good understanding of networking concepts, load balancing, SQL vs NoSQL, and caching.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?