i
PubMatic
Work with us
Filter interviews by
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 of...
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 tr...
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. Determin...
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 ma...
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.
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 bu...
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
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 V
...
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 t...
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 tha...
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.
I appeared for an interview 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.
Top trending discussions
I applied via Naukri.com and was interviewed before May 2021. There were 4 interview rounds.
It was mixed like aptitude and from technical.
I applied via LinkedIn and was interviewed in Jan 2021. There were 5 interview rounds.
I applied via LinkedIn
posted on 2 Aug 2021
Sprint ceremonies are meetings held during a sprint to facilitate communication and collaboration within the team.
Sprint planning: where the team plans the work to be done in the upcoming sprint
Daily stand-up: a brief meeting where team members share progress and discuss any obstacles
Sprint review: a meeting where the team demonstrates the work completed during the sprint
Sprint retrospective: a meeting where the team r...
posted on 13 Nov 2021
I applied via Naukri.com and was interviewed in May 2021. There were 3 interview rounds.
I applied via Naukri.com and was interviewed in Sep 2021. There was 1 interview round.
I applied via Campus Placement and was interviewed before Jan 2022. There were 3 interview rounds.
I applied via Naukri.com and was interviewed in May 2021. There were 4 interview rounds.
Softwaretest Engineer
102
salaries
| ₹3.4 L/yr - ₹5.1 L/yr |
Senior Software Engineer
98
salaries
| ₹12 L/yr - ₹42 L/yr |
Software Engineer
82
salaries
| ₹11.6 L/yr - ₹20.8 L/yr |
Principal Software Engineer
52
salaries
| ₹19 L/yr - ₹51 L/yr |
QA Engineer
27
salaries
| ₹3.5 L/yr - ₹4.9 L/yr |
Tekwissen
Damco Solutions
smartData Enterprises
In Time Tec Visionsoft