Filter interviews by
I applied via LinkedIn and was interviewed before Oct 2023. There were 2 interview rounds.
I applied via Company Website and was interviewed in Oct 2018. There was 0 interview round.
I applied via Walk-in and was interviewed before Sep 2019. There were 3 interview rounds.
I appeared for an interview in Aug 2017.
Merge Sort is a divide and conquer algorithm that sorts an array by dividing it into two halves, sorting them separately, and then merging the sorted halves.
Divide the array into two halves
Recursively sort the two halves
Merge the sorted halves
Find pairs of integers in a BST whose sum is equal to a given number.
Traverse the BST and store the values in a hash set.
For each node, check if (X - node.value) exists in the hash set.
If yes, add the pair (node.value, X - node.value) to the result.
Continue traversal until all nodes are processed.
Merge overlapping time intervals into mutually exclusive intervals.
Sort the intervals based on their start time.
Iterate through the intervals and merge overlapping intervals.
Output the mutually exclusive intervals.
Example: [(1,3), (2,6), (8,10), (15,18)] -> [(1,6), (8,10), (15,18)]
Different types of hashing and alternative for Linear Chaining
Different types of hashing include division, multiplication, and universal hashing
Alternative for Linear Chaining is Open Addressing
Open Addressing includes Linear Probing, Quadratic Probing, and Double Hashing
An AVL tree is a self-balancing binary search tree where the heights of the left and right subtrees differ by at most one.
AVL tree is a binary search tree with additional balance factor for each node.
The balance factor is the difference between the heights of the left and right subtrees.
Insertion and deletion operations in AVL tree maintain the balance factor to ensure the tree remains balanced.
Rotations are performed ...
Find the minimum number of squares whose sum equals to a given number n.
Use dynamic programming to solve the problem efficiently.
Start with finding the square root of n and check if it is a perfect square.
If not, then try to find the minimum number of squares required for the remaining number.
Repeat the process until the remaining number becomes 0.
Return the minimum number of squares required for the given number n.
Insertion sort for a singly linked list.
Traverse the list and compare each node with the previous nodes
If the current node is smaller, swap it with the previous node
Repeat until the end of the list is reached
Time complexity is O(n^2)
I applied via LinkedIn and was interviewed before Jul 2021. There were 2 interview rounds.
Easy logical questions
basic quant
Easy level coding questions
Counting frequency of alphabets
I appeared for an interview before Sep 2016.
Search an element in sorted rotated array.
Use binary search to find the pivot point where the array is rotated.
Divide the array into two subarrays and perform binary search on the appropriate subarray.
Handle the cases where the target element is at the pivot point or not present in the array.
Find the Kth largest element in an array.
Sort the array in descending order and return the element at index K-1.
Use a max heap to find the Kth largest element efficiently.
Implement a quickselect algorithm to find the Kth largest element in linear time.
Reverse a linked list in groups of n elements.
Divide the linked list into groups of n elements.
Reverse each group individually.
Connect the reversed groups to form the final linked list.
Handle cases where the number of elements is not a multiple of n.
Example: 1->2->3->4->5->6->7->8, n=3 -> 3->2->1->6->5->4->8->7
Find the median of two sorted arrays.
Merge the two arrays into one sorted array and find the median.
Use binary search to find the median in O(log(min(m, n))) time complexity.
Handle edge cases like empty arrays or arrays of different lengths.
Count number of paths from (0, 0) to (m, n) in a matrix while crossing through some indexes were not allowed.
Use dynamic programming to solve the problem
Create a 2D array to store the number of paths
Traverse the matrix and update the array based on the allowed paths
Return the value at the last index of the array
I appeared for an interview in Aug 2017.
Print the level order traversal of binary tree in spiral form
Perform level order traversal of the binary tree
Alternate the direction of traversal for each level
Use a stack to reverse the order of nodes in each level
Print the nodes in the order of traversal
Find the maximum element in each subarray of size k in a given array.
Iterate through the array from index 0 to n-k.
For each subarray of size k, find the maximum element.
Store the maximum elements in a separate array.
Return the array of maximum elements.
To find the Kth largest element in two sorted arrays, we can use the merge step of merge sort algorithm.
Merge the two arrays into a single sorted array using a modified merge sort algorithm.
Return the Kth element from the merged array.
Merge two sorted arrays into one sorted array with expected time complexity of (m+n).
Use a two-pointer approach to compare elements from both arrays and merge them into the first array.
Start comparing elements from the end of both arrays and place the larger element at the end of the first array.
Continue this process until all elements from the second array are merged into the first array.
based on 1 interview
Interview experience
Senior Software Engineer
26
salaries
| ₹12.1 L/yr - ₹24.6 L/yr |
Product Support Executive
23
salaries
| ₹4.5 L/yr - ₹9.8 L/yr |
Quality Engineer
17
salaries
| ₹2.9 L/yr - ₹10 L/yr |
Software Engineer
14
salaries
| ₹8.5 L/yr - ₹17 L/yr |
Technical Lead
12
salaries
| ₹22 L/yr - ₹27.5 L/yr |
Accenture
Capgemini
HCLTech
Teleperformance