Upload Button Icon Add office photos
Premium Employer

i

This company page is being actively managed by PubMatic Team. If you also belong to the team, you can get access from here

PubMatic Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

Clear (1)

PubMatic SDE-2 Interview Questions, Process, and Tips

Updated 16 Sep 2021

PubMatic SDE-2 Interview Experiences

1 interview found

SDE-2 Interview Questions & Answers

user image Anonymous

posted on 16 Sep 2021

I was interviewed in Jan 2021.

Round 1 - Video Call 

(3 Questions)

Round duration - 90 Minutes
Round difficulty - Medium

It was a zoom call with a SDE-2 person, after 15 mins into my background he jumped directly to the questions
 

  • Q1. 

    Binary Tree Zigzag Traversal Problem Statement

    Given a Binary Tree comprised of 'N' nodes with integer values, your task is to print the zigzag traversal of the tree.

    Note:

    The zigzag pattern implies th...

  • Ans. 

    Implement a function to print the zigzag traversal of a Binary Tree.

    • Traverse the Binary Tree level by level, alternating the direction of traversal for each level.

    • Use a queue to keep track of nodes at each level and a flag to switch the direction of traversal.

    • Print the values of nodes in the zigzag order as described in the problem statement.

  • Answered by AI
  • Q2. 

    Convert Binary Tree to Mirror Tree

    Convert a given binary tree into its mirror tree, where the left and right children of all non-leaf nodes are interchanged.

    Input:

    An integer ‘T’ denoting the number o...
  • Ans. 

    Convert a binary tree into its mirror tree by interchanging left and right children of non-leaf nodes.

    • Traverse the tree in a recursive manner and swap the left and right children of each node.

    • Use a temporary variable to swap the children of each node.

    • Ensure to modify the tree in place without creating a new tree.

    • Example: For the input tree 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1, the mirror tree will have inorder travers

  • Answered by AI
  • Q3. 

    Time to Burn Tree Problem

    You are given a binary tree consisting of 'N' unique nodes and a start node where the burning will commence. The task is to calculate the time in minutes required to completely b...

  • Ans. 

    Calculate the time in minutes required to completely burn a binary tree starting from a given node.

    • Start burning from the given node and spread fire to adjacent nodes each minute

    • Track the time taken for each node to burn completely

    • Return the maximum time taken to burn the entire tree

  • Answered by AI
Round 2 - Video Call 

(1 Question)

Round duration - 90 Minutes
Round difficulty - Medium

Again this was a Problem Solving round taken by a SDE-2 

  • Q1. 

    Topological Sort Problem Statement

    Given a Directed Acyclic Graph (DAG) consisting of V vertices and E edges, your task is to find any topological sorting of this DAG. You need to return an array of size ...

  • Ans. 

    Implement a function to find any topological sorting of a Directed Acyclic Graph (DAG).

    • Use Depth First Search (DFS) to find the topological ordering of the vertices.

    • Start by visiting a vertex and recursively visit its adjacent vertices before adding it to the result array.

    • Maintain a visited array to keep track of visited vertices and avoid cycles.

    • Once all vertices are visited, reverse the result array to get the topolo...

  • Answered by AI
Round 3 - Video Call 

(1 Question)

Round duration - 100 Minutes
Round difficulty - Hard

This round was with a SDE-3(Principal Engineer)

  • Q1. 

    Trailing Zeros in Factorial Problem

    Find the number of trailing zeroes in the factorial of a given number N.

    Input:

    The first line contains an integer T representing the number of test cases.
    Each of the...
  • Ans. 

    Count the number of trailing zeros in the factorial of a given number.

    • Count the number of factors of 5 in the factorial of the given number N.

    • Divide N by 5, then by 25, then by 125, and so on, and sum up the quotients to get the total number of trailing zeros.

    • Example: For N=10, 10/5=2, so there are 2 factors of 5 in 10!, hence 2 trailing zeros.

  • Answered by AI
Round 4 - Video Call 

Round duration - 90 Minutes
Round difficulty - Hard

This round was scheduled with a SDE-3/SDE-4(Senior Principal Engineer):
He directly started with questions after my introduction of 5mins
 

Round 5 - Video Call 

(1 Question)

Round duration - 90 Miinutes
Round difficulty - Medium

Discussion with Hiring Manager
 

  • Q1. 

    Loot Houses Problem Statement

    A thief is planning to steal from several houses along a street. Each house has a certain amount of money stashed. However, the thief cannot loot two adjacent houses. Determi...

  • Ans. 

    Determine the maximum amount of money a thief can steal from houses without looting two consecutive houses.

    • Use dynamic programming to keep track of the maximum money that can be stolen up to each house.

    • At each house, the thief can either choose to steal from the current house or skip it and steal from the previous house.

    • The maximum amount of money that can be stolen without looting two consecutive houses is the maximum

  • Answered by AI
Round 6 - Video Call 

Round duration - 75 Minutes
Round difficulty - Easy

This round was with VP in Redwood City , it was scheduled around 11:00 pm IST
 

Interview Preparation Tips

Professional and academic backgroundI completed Computer Science Engineering from Guru Gobind Singh Indraprastha University. I applied for the job as SDE - 2 in PuneEligibility criteria2+ years of Experience in relevant field/teamPubMatic interview preparation:Topics to prepare for the interview - DataStructures , Algorithms, System Design,Big Data,Spark,OptimizationTime required to prepare for the interview - 3 monthsInterview preparation tips for other job seekers

Tip 1 : Be solid with the basics of Ds, Algo. Good to have end to end projects which are hosted on cloud/Github.
Tip 2 : Its always good to be presentable and have good communications skills
Tip 3 : Be honest, clear in approach and always walkthrough your thought process to the interviewer, If you dont know something kindly refuse , dont try to fake anything

Application resume tips for other job seekers

Tip 1 : Mention your projects and experience at the top. Be clear on what was done, a brief on how it was done, language /tech stack involved. If possible try to host and make it accessible. You never know if you can present it with just one click.
Tip 2 : Choose a balance between, white spaces and text, it should be well indented, no grammatical errors.
Tip 3 : It takes less than 2 min to scan a resume. Don't mention things which are irrelevant.

Final outcome of the interviewSelected

Skills evaluated in this interview

Rate your
company

🤫 100% anonymous

How was your last interview experience?

Share interview

Interview questions from similar companies

I applied via Campus Placement

Interview Questionnaire 

3 Questions

  • Q1. Tell me one thing about you that's not listed on your resume
  • Ans. 

    I am an avid traveler and have visited over 20 countries

    • I love experiencing new cultures and trying new foods

    • I have backpacked through Europe and Asia

    • I have volunteered in orphanages in Cambodia and Nepal

  • Answered by AI
  • Q2. When you hear InMobi, what's the first word that comes in your head?
  • Ans. 

    Mobile advertising platform

    • Adtech

    • Mobile marketing

    • App monetization

  • Answered by AI
  • Q3. The office of InMobi technologies has 10 floors, each with 300 employees. In the morning (7-8 AM), the building sees 3000 employees entering and waiting in a queue for 3 lifts. In the morning, everyone goe...

Interview Preparation Tips

Round: Resume Shortlist
Experience: The first round was a resume shortlist, which I think was on the basis of programming and coding courses (and projects) taken along with your CGPA. Out of 10 shortlisted people, I knew 4 and all of us were 9 pointers. The rest who I didn't know turned out to be 9 pointers as well! :P
Out of 10 shortlisted people, 3 (including me) were from ECE and the rest were from CS. Even though InMobi was open for Mathematics & Computing, no person from MnC dept. was in the shortlist. (Presumably due to their CGPAs or some other criterion that I'm not in the knowledge of.)
Tips: i) High CGPA is a must (We're talking above 9, at the end of 2nd year for CS/ECE and 3rd year for MnC)
ii)Taking programming and algorithm courses and projects is important, as that must be visible in your resume.

Round: Puzzle Interview
Experience: One special thing about the interviews, you're asked not to wear any formals! That actually helps in taking the tension off of things!
It's simple logic, after that. Increase the lift's speed (taking in mind of the safety), collecting usage data, optimising the lift's floor-stoppage according to that.
As told after the interview, the interviewer is just observing how you think and approach a problem.

One odd thing was not being asked about any coding/algorithm questions even though the profile was for a software engineer.

After this question, I was asked if I had any questions to ask. I simply stated that the work environment and culture affected me as much as the profile I'm applying for. Thus, the drive and motivation of the people who work there is also very important. So I asked what are the companies' values which the employees believe in, too.
Tips: Stay confident, don't let any tension get to your head.
In the future, InMobi may start asking coding questions too in the interviews. or change the selection procedure, which will be communicated in the PPT of InMobi.
Whatever may happen, the first round should show your zeal to solve problems, your creativity in trying different approaches, and applying logic to find the best solution.

Round: HR Interview
Experience: OK! There were a lot of questions asked since the interview was more like a conversation taking place. Like in ANY conversation, keep proper eye contact, smile and be approachable for any questions. Show enthusiasm in your voice and your answers. The interviewer asked me questions about
i)My resume, and all the activities that I'd listed there. (eg: Why did you enlist in this course? Do you like coding?)
ii)Why programming, how does it interest you?
iii)Basic questions about InMobi, like 'What do you know about us after attending the PPT?' and 'Why InMobi'

Since I had done quite a lot of marketing activities, I was also asked about that. Will you do an MBA in the future? What all did you do for marketing? I had a strong background in digital marketing, and we had a little chat about mobile marketing and what's the future of mobile advertising.
Tips: Smile, for god's sake! It's a conversation about you, do all the basic things to improve the conversational experience.
Small things like greeting the interviewer, smiling, proper eye contact, and speaking properly are paramount.

Like in any HR interview, make sure you know yourself and your resume properly, so that you don't phase out in the interview when asked some 'unexpected' question. (since that's when they know thatyou might be lying/exaggerating). Hence introspect enough before sitting the interviews.

General Tips: Make sure you're able to convince yourself and the interviewers for why do you want to work in Inmobi Technolgies.

I've already shared the rest in previous sections! :)

2 people out of 10 were selected for this internship experience, so make sure you prepare well! All the best! :D

Skill Tips: I don't think that this adds on as a skill, but InMobi wants to create a huge impact on the mobile world and the mobile advertising sector.
Your knowledge about this sector in general could help you strike good conversations (at least in the HR round).
Skills: Logic, Problem Solving Abilties, Creativity, Communication Skills
Duration: 2.5
College Name: IIT Kharagpur
Motivation: I'm a gadget geek from my childhood. The mobile industry amazes me as it's been the biggest change-bringer in the modern world. InMobi as a company wants to create a huge impact in the mobile advertising space and mobile advertising! And seeing their products that they offer in this domain had me thinking that they're doing something unique and awesome!
The work culture of InMobi is just amazing, right from flexible work hours to the epic office they have in Bangalore full of awesome people working towards that one goal! Also, InMobi offers their employees opportunities to shift between various verticals if they want to. All of this (along with a good compensation ;-) ) was enough motivation for me to apply!
Funny Moments: When I was asked whether I was in the third year, I said yes, and then said, usually people think that I'm still in high school!
We had a good laugh on that one! :P

Otherwise also, the entire procedure was relaxed and fun in general.

Interview Questionnaire 

9 Questions

  • Q1. Find Maximum sub sequence sum in an array ?
  • Ans. 

    Maximum sub sequence sum in an array

    • Use Kadane's algorithm

    • Initialize max_so_far and max_ending_here to 0

    • Iterate through the array and update max_ending_here and max_so_far

    • Return max_so_far

  • Answered by AI
  • Q2. What do you understand by the endianness of the system ? How do you find out the the type of endianness ?
  • Ans. 

    Endianness refers to the byte order of a system. It determines how multi-byte data types are stored in memory.

    • Little-endian systems store the least significant byte first, while big-endian systems store the most significant byte first.

    • Endianness can affect the way data is transmitted between systems.

    • To determine the endianness of a system, you can use the byte order mark (BOM) or write a test program that checks the by...

  • Answered by AI
  • Q3. Sort an array which consists of 0's and 1's only
  • Ans. 

    Sort an array of 0's and 1's only.

    • Use two pointers, one at the beginning and one at the end of the array.

    • Swap 0's from the beginning with 1's from the end until the pointers meet.

    • Alternatively, use a counting sort algorithm to count the number of 0's and 1's and then reconstruct the array.

  • Answered by AI
  • Q4. A question on applications of minimum spanning tree, apply prim's or kruskal's algorithm
  • Q5. What do you understand by Heaps, max and min heaps ?
  • Ans. 

    Heaps are data structures used to efficiently find the maximum or minimum element in a collection.

    • Max heap: parent nodes are always greater than or equal to child nodes

    • Min heap: parent nodes are always smaller than or equal to child nodes

    • Heaps are commonly used in priority queues and sorting algorithms

    • Heap operations include insert, delete, and extract max/min

    • Example: An array [3, 8, 2, 5, 1, 4, 6] can be represented a

  • Answered by AI
  • Q6. What do you understand by hashing ? questions on application of hashing
  • Q7. Find 3 nos a,b and c in an array where a+b = c
  • Ans. 

    Find 3 numbers in an array where a+b=c.

    • Loop through the array and check for all possible combinations of a and b.

    • Use a hash table to store the values of a and b, and check if c is present in the hash table.

    • Sort the array and use two pointers to find a and b, and then check if their sum equals c.

  • Answered by AI
  • Q8. Some puzzles, as the other interviewee said, but not asked to me
  • Q9. Questions on Dynamic programming

Interview Preparation Tips

College Name: NA

Skills evaluated in this interview

Interview Questionnaire 

3 Questions

  • Q1. Algorithms on arrays and strings (coding)
  • Ans. 

    Algorithms for manipulating arrays and strings in coding

    • Use sorting algorithms like quicksort and mergesort for arrays

    • Use string manipulation functions like substring and replace for strings

    • Use dynamic programming for optimizing solutions to array and string problems

  • Answered by AI
  • Q2. Distributed Database Design
  • Q3. Large scale Ad Server Design
  • Ans. 

    Designing a large scale Ad Server

    • Use distributed systems for scalability

    • Implement caching for faster ad delivery

    • Ensure high availability and fault tolerance

    • Use real-time bidding for efficient ad placement

    • Implement fraud detection mechanisms

    • Ensure compliance with privacy regulations

  • Answered by AI

Interview Preparation Tips

Round: Interview
Experience: They tested on thought-process during design problems. What problems are with the current solution I suggested and how to improve it...
Tips: Hints from interviewer are very helpful
Keep talking while you are thinking

Skills: Algorithms, Thinking Skills, Coding
College Name: IIT KHARAGPUR

Skills evaluated in this interview

Interview Preparation Tips

Round: Test
Experience: A coding test (Students were asked to bring Laptops)
Tips: Be thorough with C/C++, networking, OS, Data structures and architecture
Duration: 90 minutes

Round: Interview
Experience: 3 rounds of interview, one hour each, all technical 
Interview Process:All the three rounds are oriented around programming. A lot of focus was given to Data structures, C/C++, OS and algorithmsThe code from previous test is shown and they expect you to fix any bugs if thereThe interviewers are quietly friendly and help if you get stuck at any pointIf you do have any related projects, anticipate some thorough questions on that
Tips: Though the interviewers are helpful, get your basics clear early on. Don't rely on them.Practice coding sessions, a lot of companies have them as a shortlisting criteria.

College Name: IIT Madras

Interview Questionnaire 

3 Questions

  • Q1. N a line where words are separated by spaces, , and capitalize first letter of the reversed word. Other letters of the word should be in small. Input : “how are you?” → Output: “Woh Era ?uoy”
  • Ans. 

    The program capitalizes the first letter of each reversed word in a sentence.

    • Split the sentence into an array of words using space as a delimiter.

    • Reverse each word in the array and capitalize the first letter.

    • Join the modified words back into a sentence.

  • Answered by AI
  • Q2. He second question reduced to finding maximum weight matching in a bipartite graph. Not many people would have done this (maybe none)
  • Q3. There are 2 sets of countries. One set will donate clothes (something of this sort) and anotherset will accept clothes. A country can be in only 1 of the sets. The amount of clothes donated is also given. ...

Interview Preparation Tips

Round: Test
Experience: There were about 20 MCQs (30 minutes) to be done after the coding section. MCQs were totally nonsense. Can be done in 10 mins.For coding section 60 mins.  It was hosted on Hackerrank.
Duration: 90 minutes
Total Questions: 2

Round: Technical Interview
Experience: After this, selected candidates were interviewed that consists of 4 rounds and discussion was mostly on your CV and data structure problems.

General Tips: Be honest with your interviewer. If you are not comfortable in 1 topic, tell your interviewer honestly. Do well in other areas. Look for hints from the interviewer if you get stuck. They want to see how you approach a problem.
Skills: Algortihm, Data structure
College Name: IIT DELHI
Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(1 Question)

  • Q1. How do yo sharding in mongodb
  • Ans. 

    Sharding in MongoDB involves partitioning data across multiple servers to improve scalability and performance.

    • Sharding is achieved by dividing data into chunks based on a shard key

    • Each shard contains a subset of the data, distributed across multiple servers

    • MongoDB's sharding architecture includes config servers, query routers, and shard servers

    • Sharding can be implemented at the collection level in MongoDB

  • Answered by AI
Round 2 - One-on-one 

(1 Question)

  • Q1. Python questions
Round 3 - HR 

(1 Question)

  • Q1. Why you want to work here
  • Ans. 

    I am passionate about software development and believe in the company's mission and values.

    • I admire the company's innovative projects and technologies.

    • I resonate with the company's culture of collaboration and continuous learning.

    • I am excited about the opportunity to work with a talented team of developers.

    • I believe my skills and experience align well with the company's needs.

  • Answered by AI
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
More than 8 weeks
Result
Selected Selected

I was interviewed before Feb 2023.

Round 1 - Aptitude Test 

Good and easy learn dsa and algo

Round 2 - Coding Test 

Learn dsa and algo binary tree and lists

Round 3 - Technical 

(1 Question)

  • Q1. Learn basic subjects and topics like OS and Cloud
Round 4 - HR 

(1 Question)

  • Q1. Short round based on aptitude and attidtude
Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Approached by Company and was interviewed before Feb 2023. There was 1 interview round.

Round 1 - Technical 

(4 Questions)

  • Q1. Http method code
  • Q2. Difference between soap and rest
  • Ans. 

    SOAP is a protocol for exchanging structured information in web services, while REST is an architectural style for designing networked applications.

    • SOAP is a protocol, while REST is an architectural style

    • SOAP uses XML for message format, REST can use various formats like JSON, XML, etc.

    • SOAP has built-in error handling, REST relies on HTTP status codes

    • SOAP requires more bandwidth and resources, REST is lightweight and s...

  • Answered by AI
  • Q3. Difference between delete an truncate
  • Ans. 

    Delete removes rows one by one while truncate removes all rows at once.

    • Delete is a DML command while truncate is a DDL command.

    • Delete operation can be rolled back while truncate operation cannot be rolled back.

    • Delete operation fires triggers for each row deleted while truncate does not.

    • Delete operation is slower than truncate operation for large tables.

    • Example: DELETE FROM table_name WHERE condition; TRUNCATE TABLE tab

  • Answered by AI
  • Q4. Idempotent methods

Interview Preparation Tips

Interview preparation tips for other job seekers - being thorough with basics and real time example explanation helps much, rather than advanced concepts many focuses on basics and latest features update and problem solving attitude

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(4 Questions)

  • Q1. Mulesoft basics and about platform
  • Q2. Any point platform and any point studio
  • Ans. 

    The question is likely asking about experience with a specific software platform and development environment.

    • Experience with a specific software platform (e.g. AWS, Azure, Google Cloud)

    • Experience with a specific development environment (e.g. Visual Studio, IntelliJ IDEA)

    • Ability to work with different platforms and tools to develop software efficiently

  • Answered by AI
  • Q3. Best practices for better handling
  • Ans. 

    Implementing best practices for better handling in software development.

    • Use proper error handling techniques such as try-catch blocks

    • Implement logging to track errors and exceptions

    • Follow coding standards and conventions to ensure consistency

    • Use defensive programming techniques to anticipate and handle unexpected inputs

    • Regularly review and refactor code to improve maintainability

  • Answered by AI
  • Q4. Expected CTC and related stuff

Interview Preparation Tips

Interview preparation tips for other job seekers - Study well

Skills evaluated in this interview

Contribute & help others!
anonymous
You can choose to be anonymous

Recently Viewed

PHOTOS

InsuranceDekho

3 office photos

LIST OF COMPANIES

Credit Bajaar

Overview

INTERVIEWS

Raja Software Labs

No Interviews

INTERVIEWS

Lifesight

No Interviews

INTERVIEWS

Greendeck

No Interviews

INTERVIEWS

Nxtra by Airtel

No Interviews

INTERVIEWS

Mirabel Technologies

No Interviews

Tell us how to improve this page.

Anonymously discuss salaries, work culture, and many more

Get Ambitionbox App

Interview Questions from Similar Companies

Globant Interview Questions
3.8
 • 172 Interviews
Grey Orange Interview Questions
3.2
 • 38 Interviews
Mobileum Interview Questions
3.3
 • 37 Interviews
InMobi Interview Questions
3.5
 • 35 Interviews
CodeClouds Interview Questions
4.5
 • 35 Interviews
View all
Softwaretest Engineer
102 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Senior Software Engineer
80 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Software Engineer
72 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Principal Software Engineer
47 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

QA Engineer
27 salaries
unlock blur

₹0 L/yr - ₹0 L/yr

Explore more salaries
Compare PubMatic with

InMobi

3.5
Compare

Komli Media

4.0
Compare

Adcolony

5.0
Compare

Affle

3.1
Compare
Did you find this page helpful?
Yes No
write
Share an Interview
Rate your experience using AmbitionBox
Terrible
Terrible
Poor
Poor
Average
Average
Good
Good
Excellent
Excellent