Papaya Global | Senior Software Engineer | Remote | [12 Jan 2025]
Status: Interviewed for a Senior Software Engineer role at Papaya Global.
Round 1: Technical Phone Screen (1 Hour)
Behavioral Questions:
- Introduction: The interviewer asked about my background, work experience, and responsibilities in previous roles.
- Why Papaya Global?: Discussed my motivation for applying and what excites me about the role.
- Career Goals: Talked about my long-term aspirations and technical interests.
Technical Questions:
1. Java 8 Features
I was asked to list and explain key features of Java 8, including:
- Lambda expressions – Used for writing concise, functional-style code.
- Functional interfaces – Interfaces with a single abstract method, e.g.,
Runnable, Predicate<T>.
- Stream API – Used for processing collections in a declarative way.
- Default methods – Interface methods with default implementations.
- Optional class – Helps avoid
NullPointerException.
- CompletableFuture – Supports asynchronous programming.
- java.time package – New Date and Time API replacing legacy
java.util.Date.
2. Internal Working of HashMap in Java
- Explained how HashMap stores key-value pairs in an array of buckets.
- Discussed how the hash code determines the bucket where the entry is placed.
- Described collision handling using a linked list (Java 7) and tree nodes (Java 8) when hash collisions occur.
3. Cyclic Dependency in Spring
- Defined cyclic dependency (when two or more beans depend on each other in a circular way).
- Discussed potential issues like infinite loops and stack overflow errors.
How to fix cyclic dependency:
- Redesigning the application to break the cycle.
- Using @Lazy annotation to delay bean creation.
- Switching from constructor injection to setter injection.
- Using interfaces to decouple dependencies.
- Using @PostConstruct to initialize beans after dependency injection.
4. Spring Autowiring
- Explained that autowiring allows Spring to automatically inject dependencies.
- Discussed different types:
- Field Injection (
@Autowired on a field).
- Constructor Injection (preferred for immutability).
- Setter Injection (useful for optional dependencies).
5. Difference Between HashMap and ConcurrentHashMap
| Feature | HashMap | ConcurrentHashMap |
|---|
| Thread Safety | Not thread-safe | Thread-safe |
| Performance | Fast in single-threaded env | Better in multi-threaded |
| Null Keys/Values | Allows null keys/values | Does not allow null keys |
| Internal Structure | Uses buckets + linked list/tree | Uses segmented locking |
Feedback & Outcome:
- The interviewer appreciated my Java fundamentals and Spring knowledge.
- Suggested improving my system design skills and optimizing concurrency handling.
- Result: Rejected after the first round.
My Thoughts:
The interview was well-structured and focused on Java, Spring, and concurrency concepts. The feedback was constructive, and I plan to work on system design, scalability, and advanced concurrency handling for future opportunities.