pubmatic logo

Pubmatic Interviews

1 experience16 reads
Pubmatic Java Developer Interview Experience | Pune
pubmatic logo
Pubmatic
Java DeveloperPune1.3 years
September 30, 202516 reads

Summary

I recently interviewed for a Java Developer position at Pubmatic in Pune, which involved three distinct rounds focusing on Data Structures & Algorithms, Core Java, Spring Boot, and System Design principles.

Full Experience

Round 1

This round primarily focused on a mix of Data Structures & Algorithms and core Java/Spring Boot concepts. I was given two DSA questions to solve:

  1. Rotate array at index k
  2. Find a loop in a linked list

Following the DSA problems, the discussion shifted to various theoretical topics including:

  • Explaining the Spring MVC architecture
  • Strategies for scaling my current project to handle a million users
  • Concepts related to Java Streams
  • Principles of Object-Oriented Programming (OOPS)
  • Understanding Indexing in Databases
  • Several resume-based questions to delve into my past work.

Round 2

The second round continued with a DSA question, then delved deeper into Java and Spring topics.

  1. I was asked to find the winner in a Tic Tac Toe board of NxN size, which required careful handling of edge cases and general board traversal.

The discussion then moved to advanced Java and Spring concepts:

  • Multithreading, specifically how to avoid race conditions and various implementation approaches.
  • The different scopes of beans in Spring.
  • The Singleton design pattern.
  • Detailed questions about Indexing and B-trees in databases.
  • Implementing Depth-First Search (DFS) using pseudocode.
  • Concepts surrounding Anomaly Detection.
  • Explaining the Diamond Problem in Java and its implications.

Round 3

The final round was heavily focused on design and scaling, along with project discussions.

  1. I had to perform a Low-Level Design (LLD) for a Snake and Ladder game, detailing the classes and interactions.
  2. The discussion revisited how I would scale a system to accommodate a million users.
  3. There were extensive Project Q&A sessions, where I had to explain my past projects in detail.
  4. Finally, there was a general discussion about Generative AI (GenAI).

Interview Questions (17)

Q1
Rotate Array at Index k
Data Structures & AlgorithmsEasy

Given an array, rotate the array to the right by k steps, where k is non-negative. For example, if array is [1,2,3,4,5,6,7] and k=3, the output should be [5,6,7,1,2,3,4].

Q2
Detect Cycle in Linked List
Data Structures & AlgorithmsEasy

Given the head of a singly linked list, determine if it has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer.

Q3
Explain Spring MVC Architecture
Other

Describe the architecture of the Spring Model-View-Controller (MVC) framework, including its core components like DispatcherServlet, Controller, Model, View, and View Resolver, and how they interact to handle a web request.

Q4
Scale Project to Million Users
System Design

Discuss strategies and architectural considerations for scaling a web application or project to effectively handle a workload of a million concurrent users. Cover aspects like load balancing, database scaling, caching, microservices, etc.

Q5
Java Streams Concepts
Other

Explain the concept of Java Streams API introduced in Java 8. Discuss its features, common operations (filter, map, reduce), intermediate and terminal operations, and benefits over traditional collections processing.

Q6
Object-Oriented Programming (OOPS) Concepts
Other

Explain the fundamental principles of Object-Oriented Programming (OOPS): Encapsulation, Inheritance, Polymorphism, and Abstraction. Provide real-world examples or code snippets to illustrate each concept.

Q7
Database Indexing
Other

Explain what database indexing is, why it's used, and how it improves query performance. Discuss different types of indexes (e.g., clustered vs. non-clustered) and their trade-offs.

Q8
Tic Tac Toe Winner NxN Board
Data Structures & AlgorithmsMedium

Given a completed Tic Tac Toe board of size NxN, determine if there is a winner. A winner is defined as N consecutive marks (either 'X' or 'O') in any row, column, or diagonal.

Q9
Multithreading and Race Conditions
Other

Explain multithreading in Java, including how threads are created and managed. Discuss the concept of a race condition, how it occurs, and various mechanisms (e.g., synchronized blocks, locks, volatile keyword) to prevent or handle them.

Q10
Spring Bean Scopes
Other

Explain the different bean scopes available in the Spring Framework (e.g., singleton, prototype, request, session, global session, application, websocket) and when to use each.

Q11
Singleton Design Pattern
Other

Explain the Singleton design pattern, its purpose, and provide a Java implementation. Discuss common challenges (e.g., thread safety, reflection, serialization) and ways to address them.

Q12
Database Indexing with B-Trees
Other

Explain the concept of B-trees and B+ trees, and how they are fundamental data structures used for indexing in most relational databases. Discuss their advantages in disk-based storage and query performance.

Q13
Depth-First Search (DFS) Implementation
Data Structures & AlgorithmsEasy

Provide pseudocode or a high-level explanation for implementing the Depth-First Search (DFS) algorithm for traversing a graph or tree. Discuss its typical applications.

Q14
Anomaly Detection Concepts
Other

Discuss the basic concepts of anomaly detection. What are anomalies, why is their detection important, and what are some general approaches or techniques (e.g., statistical, machine learning-based) used to identify them?

Q15
Diamond Problem in Java
Other

Explain the 'Diamond Problem' in the context of multiple inheritance and how Java addresses this issue, particularly with interfaces and default methods.

Q16
Low-Level Design (LLD) for Snake and Ladder Game
System DesignMedium

Design the core components and interactions for a Snake and Ladder game. This includes designing classes for Player, Board, Dice, Snake, Ladder, and the Game itself, along with their attributes and methods.

Q17
Scale System to Million Users (Round 3)
System Design

Discuss strategies and architectural considerations for scaling a web application or project to effectively handle a workload of a million concurrent users. Cover aspects like load balancing, database scaling, caching, microservices, etc. (Asked again in a different round).

Have a Pubmatic Interview Experience to Share?

Help other candidates by sharing your interview experience. Your insights could make the difference for someone preparing for their dream job at Pubmatic.