
PubMatic


PubMatic Interview Questions and Answers for Freshers
Q1. Which coding language do you prefer and why?
I prefer Python because of its simplicity, readability, and extensive libraries.
Python is known for its simplicity and readability, making it easier to write and understand code.
Python has a large number of libraries and frameworks that can be used to quickly develop applications.
Python's syntax is clean and concise, allowing for faster development and easier maintenance.
Python is widely used in various domains such as web development, data analysis, and machine learning.
Pyth...read more
Q2. Data structure with code writing
Implement a stack data structure using an array of strings.
Use an array to store the strings in the stack.
Implement push() and pop() functions to add and remove elements from the stack.
Keep track of the top of the stack using a variable.
Q3. Loop in kinked list
Detecting a loop in a linked list
Use two pointers, one moving at double the speed of the other
If there is a loop, the two pointers will eventually meet
Use Floyd's Cycle Detection Algorithm for efficient solution
Q4. What if person mistakenly put F for male and M for female in sql how do you solve this
To solve the issue of mistakenly assigned gender values in SQL, you can update the incorrect values using SQL queries.
Identify the incorrect gender values in the SQL table
Use UPDATE statement with appropriate conditions to correct the values
For example, if 'F' is mistakenly assigned for male, update it to 'M' using UPDATE statement
Q5. Count the occurances a purticualar word from a file.
Count the occurrences of a particular word from a file.
Read the file and store its contents in a string variable.
Split the string into an array of words using a delimiter.
Loop through the array and count the occurrences of the particular word.
Return the count.
Q6. Write a code in c c++ or any other language to validate all use cases for an ip address given as input string. Output will be yes or no.
Code to validate all use cases for an IP address input string and output yes or no.
Use regular expressions to match the input string against the valid IP address pattern.
Check for valid ranges of each octet (0-255) and proper formatting (4 octets separated by periods).
Handle edge cases like leading zeros, extra spaces, and invalid characters.
Return 'yes' if the input string is a valid IP address, otherwise return 'no'.
Q7. Given 2 sorted integer array print the common value between them. 2 to 3 optimized ways.
Find common values in two sorted integer arrays efficiently.
Use two pointers approach to iterate through both arrays simultaneously.
If the current values are equal, add it to the result and move both pointers forward.
If the current values are not equal, move the pointer of the array with the smaller value forward.
Interview Process at PubMatic for Freshers

Top Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

