i
PubMatic
Filter interviews by
Clear (1)
I was interviewed in Jan 2021.
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
Given a Binary Tree comprised of 'N' nodes with integer values, your task is to print the zigzag traversal of the tree.
The zigzag pattern implies th...
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.
Convert a given binary tree into its mirror tree, where the left and right children of all non-leaf nodes are interchanged.
An integer ‘T’ denoting the number o...
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
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...
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
Round duration - 90 Minutes
Round difficulty - Medium
Again this was a Problem Solving round taken by a SDE-2
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 ...
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...
Round duration - 100 Minutes
Round difficulty - Hard
This round was with a SDE-3(Principal Engineer)
Find the number of trailing zeroes in the factorial of a given number N
.
The first line contains an integer T
representing the number of test cases.
Each of the...
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.
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 duration - 90 Miinutes
Round difficulty - Medium
Discussion with Hiring Manager
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...
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
Round duration - 75 Minutes
Round difficulty - Easy
This round was with VP in Redwood City , it was scheduled around 11:00 pm IST
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
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.
Rate your
company
🤫 100% anonymous
How was your last interview experience?
Top trending discussions
I applied via Campus Placement
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
Mobile advertising platform
Adtech
Mobile marketing
App monetization
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
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...
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.
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
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.
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
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
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.
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
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.
I was interviewed before Feb 2023.
Good and easy learn dsa and algo
Learn dsa and algo binary tree and lists
I applied via Approached by Company and was interviewed before Feb 2023. There was 1 interview round.
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...
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
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
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
Anonymously discuss salaries, work culture, and many more
Get Ambitionbox App
Softwaretest Engineer
102
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
80
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
72
salaries
| ₹0 L/yr - ₹0 L/yr |
Principal Software Engineer
47
salaries
| ₹0 L/yr - ₹0 L/yr |
QA Engineer
27
salaries
| ₹0 L/yr - ₹0 L/yr |
InMobi
Komli Media
Adcolony
Affle