Summary
I applied for an SDE-2 position at Recro in August 2023, which consisted of an online assessment followed by a detailed technical interview. Despite tackling several challenging problems, I unfortunately received a rejection.
Full Experience
My interview process for the SDE-2 role at Recro started with an Online Assessment. This round had a total of 12 questions, comprising 10 MCQ questions and 2 coding questions. Unfortunately, I don't have the specifics of the coding problems. Following the online assessment, I proceeded to the Technical Interview round where I was asked a series of questions covering data structures, algorithms, object-oriented design, and core computer science concepts.
Interview Questions (6)
Given a sorted array of house locations, for example, {0, 31, 65, 80, 121, 190, 203}, and a maximum distance maxDistanceOfMailBox (e.g., 50) that a mailbox can cover from any house, determine the minimum number of mailboxes required to ensure all houses are within reach of at least one mailbox.
Given the head of a linked list and an integer n, reverse the nodes of the list n at a time. If the number of nodes is not a multiple of n, then the remaining nodes at the end should also be reversed. For example:
- Input:
1->2->3->4->5->null,n=2
Output:2->1->4->3->5->null - Input:
1->2->3->4->5->null,n=3
Output:3->2->1->5->4->null
Predict the output or discuss the behavior of the given Java code snippet, focusing on interface implementation and the @Autowired annotation, specifically what instance of DemoA would be injected into class D's demoA field if no specific qualifier is used.
interface DemoA
{
public void demo();
}
class DemoB implements DemoA
{
public void demo()
{
// implementation for DemoB
}
}
class DemoC implements DemoA
{
public void demo()
{
// implementation for DemoC
}
}
class D
{
@Autowired
private DemoA demoA;
public void demoMine()
{
demoA.demo();
}
}
Given a User entity, design appropriate RESTful URLs and specify the HTTP method types for the following use cases:
- Find all users
- Find a user by ID
Design a data model for a shopping cart system that supports the following core use cases:
- A user should be able to add a product to their cart.
- A user should be able to remove a product from their cart.
- A user should be able to list all products currently in their cart.
Explain the fundamental concept of Garbage Collection in programming languages. Elaborate on its purpose, how it works, and describe different types or common algorithms used for garbage collection.