Filter interviews by
Clear (1)
I applied via Referral and was interviewed in Jun 2024. There were 2 interview rounds.
Create a program to print last 10 lines from a file and trigger itself every minute.
Read the file and store the last 10 lines in a data structure like a queue or array
Use a timer to trigger the program every minute
Print the last 10 lines from the data structure
I was interviewed in Jan 2021.
Round duration - 90 minutes
Round difficulty - Medium
2 Coding problems , MCQs (CS related, ML related)
An assignment is to link adjacent nodes at the same level in a binary tree. Each node in a binary tree has at most two children (left and right) and a next po...
Connect adjacent nodes at the same level in a binary tree by setting next pointers.
Traverse the tree level by level using a queue.
For each level, connect nodes using the next pointer.
Set the next pointer of the last node in each level to NULL.
Use constant space aside from input constraints.
Example: Input - 1 2 3 4 -1 5 6 -1 7 -1 -1 -1 -1 -1 -1, Output - 1 # 2 3 # 4 5 6 # 7 #
In a singly linked list, detect if a loop exists and remove the loop if present. Modify the linked list directly to eliminate any loops before returning it.
Detect and remove loop in a singly linked list efficiently.
Use Floyd's Cycle Detection Algorithm to detect the loop in the linked list.
Once the loop is detected, use two pointers to find the start of the loop.
Break the loop by setting the next pointer of the last node in the loop to null.
Round duration - 60 minutes
Round difficulty - Medium
2 Coding problems, No compilation of code. Only pseudocode required
Given two sorted arrays A
and B
of sizes N
and M
, find the median of the merged array formed by combining arrays A
and B
. If the total number of elements, N + M
, is even, the m...
Find the median of two sorted arrays by merging them and calculating the median of the combined array.
Merge the two sorted arrays into one sorted array.
Calculate the median of the merged array based on the total number of elements.
If the total number of elements is even, take the mean of the two middle elements as the median.
Given a binary tree, develop a solution to retrieve a list of all the leaf nodes in the order they appear from left to right. If two leaf nodes are equidistant fro...
Retrieve leaf nodes from a binary tree in left to right order, prioritizing lesser depth or smaller node data if equidistant from leftmost node.
Traverse the binary tree in level order and keep track of leaf nodes.
Prioritize leaf nodes with lesser depth or smaller node data if equidistant from leftmost node.
Return the list of leaf nodes in the order they appear from left to right.
Round duration - 40 minutes
Round difficulty - Hard
OS-CN fundamentals
A peer-to-peer connection is a network connection between two or more devices without the need for a central server.
Allows devices to communicate directly with each other
Each device can act as both a client and a server
Commonly used in file sharing applications like BitTorrent
Key concepts related to virtual memory and potential follow-up questions
Key concepts: paging, segmentation, page tables, TLB, page faults, thrashing
Follow-up questions: How does virtual memory differ from physical memory? What is the role of the operating system in managing virtual memory? How does virtual memory improve system performance?
Example: Explain the concept of page tables and how they are used in virtual mem
Tip 1 : Never leave any topic from any chapter / Subject
Tip 2 : Learn to explain your thoughts well
Tip 3 : Learn from previous experiences / interviews / problems asked.
Tip 4 : Atleast 4 projects in Resume
Tip 1 : Atleast 4 projects on Resume
Tip 2 : Do not write false things. You always get caught. Be genuine.
Top trending discussions
Find an odd occurring number among even occurring numbers.
Use XOR operation to cancel out even occurring numbers and get the odd occurring number.
Iterate through the array and XOR each element with the result variable.
The final result will be the odd occurring number.
Print the spiral order of a binary tree and matrix.
For binary tree, use level order traversal and alternate direction for each level.
For matrix, use four pointers to traverse in spiral order.
Example for binary tree: 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9
Example for matrix: 1 2 3 4 -> 8 7 6 5 -> 9 10 11 12 -> 16 15 14 13
Finding pairs in an array with a given sum.
Iterate through the array and for each element, check if the difference between the given sum and the element exists in the array.
Use a hash table to store the elements of the array and their indices for faster lookup.
If there are multiple pairs with the same sum, return any one of them.
If no pair is found, return null or an empty array.
Find total number of k element with given avg in an array in minimum time complexity.
Use sliding window technique to traverse the array in O(n) time complexity.
Maintain a sum variable to keep track of the sum of elements in the window.
If the sum of elements in the window is equal to k times the given avg, increment the count.
Move the window by subtracting the first element and adding the next element in the array.
Printing non-boundary elements of a binary tree
Traverse the tree in any order (preorder, inorder, postorder)
Check if the current node is not a boundary node (not the first or last node in its level)
If it is not a boundary node, print its value
Recursively traverse its left and right subtrees
I was interviewed in Dec 2016.
posted on 21 Aug 2016
I applied via Campus Placement
To test if every left child's value is less than the right child's value in a binary tree.
Traverse the binary tree using any traversal algorithm (e.g., in-order, pre-order, post-order)
Compare the value of each left child with its right child
If any left child's value is greater than or equal to its right child's value, return false
If all left child's values are less than their right child's values, return true
Cloning a linked list-like structure
Create a new node for each node in the original linked list
Set the value of the new node to the value of the corresponding node in the original linked list
Set the next pointer of the new node to the new node corresponding to the next node in the original linked list
Repeat the above steps until all nodes in the original linked list are cloned
To find the nth character in a stream of bytes, we need to read the stream byte by byte until we reach the nth position.
Start reading the stream byte by byte until you reach the nth position
Return the byte at the nth position
If the stream ends before reaching the nth position, return null or throw an exception
Rearrange a string to avoid consecutive same characters.
Iterate through the string and keep track of the previous character.
If the current character is the same as the previous, swap it with the next different character.
Repeat until no consecutive same characters are left.
The task is to find the next highest palindrome number given a number.
Convert the given number to a string
Check if the number is already a palindrome
If not, increment the number by 1 and check if it is a palindrome
Repeat the previous step until a palindrome is found
Canonicalizing a directory path involves simplifying and standardizing the path to remove any redundant or unnecessary elements.
Remove any consecutive slashes and replace them with a single slash
Remove any trailing slashes
Resolve any relative paths (e.g., '..' and '.')
Handle special cases like the root directory ('/')
Normalize the path by removing any unnecessary elements
posted on 21 Aug 2016
I applied via Campus Placement
posted on 2 Dec 2016
I applied via Campus Placement and was interviewed in Dec 2016. There were 6 interview rounds.
App performance analysis involves identifying and resolving bottlenecks to improve user experience.
Collect and analyze performance metrics such as response time, CPU usage, memory usage, and network latency.
Identify and prioritize bottlenecks based on impact on user experience and frequency of occurrence.
Implement optimizations such as caching, code refactoring, and database tuning.
Continuously monitor and test perform...
posted on 2 Dec 2016
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
based on 1 interview
Interview experience
based on 1 review
Rating in categories
Content Analyst
43
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
27
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
23
salaries
| ₹0 L/yr - ₹0 L/yr |
QA Engineer
16
salaries
| ₹0 L/yr - ₹0 L/yr |
Analyst
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Bloomberg
Thomson Reuters
FactSet
S&P Global