Filter interviews by
I applied via Naukri.com and was interviewed in Sep 2023. There were 4 interview rounds.
Just gave me an assignment based on reactjs where have to implement cart, order approval, print the list of items, product edit modal (quantity & price) and search features.
Service Worker runs in the background and handles network requests, while Web Workers run scripts in parallel to the main thread.
Service Worker is used for caching and handling network requests in the background.
Web Workers are used for running scripts in parallel to the main thread to improve performance.
Service Workers can intercept and cache network requests, making web apps faster and more reliable.
Web Workers can ...
I appeared for an interview before May 2021.
Round duration - 30 minutes
Round difficulty - Medium
Given a string S, your task is to recursively remove all consecutive duplicate characters from the string.
String S
Output string
Recursively remove consecutive duplicate characters from a string.
Use recursion to check if the current character is the same as the next character, if so, skip the next character
Base case: if the string is empty or has only one character, return the string
Recursive case: if the current character is the same as the next character, call the function recursively with the string excluding the next character
Round duration - 90 minutes
Round difficulty - Easy
You are provided with a string S
and an array of integers A
of size M
. Your task is to perform M
operations on the string as specified by the indices in array A
...
Perform a series of reverse string operations on a given string based on specified indices.
Iterate through the array of indices and reverse the substring of the string based on the given indices.
Ensure to reverse the substring from the starting index to len(S) - starting index - 1.
Continue the operations in the sequence specified by the array of indices to get the final string.
Round duration - 50 minutes
Round difficulty - Medium
Tip 1 : Prepare well for resume & confidence for basic part of CS.
Tip 2 : Good knowledge of skills set which mentioned in CV.
Tip 3 : Explain about projects which you have worked earlier & your roles and responsibilities.
Tip 1 : Mentioned all the skills & certificate till date update your resume every 3 month's.
Tip 2 : Proper skills set with project explanation and duration of project which you have worked on
Find sum of all numbers formed from root to leaf path in a binary tree
Traverse the binary tree using DFS
At each leaf node, add the number formed from root to leaf path to a sum variable
Return the sum variable
Time complexity: O(n)
Example: For a binary tree with root value 1, left child 2 and right child 3, the sum would be 12 + 13 = 25
Given a string, print all possible strings that can be made by placing spaces (zero or one) in between them.
Use recursion to generate all possible combinations of spaces
For each recursive call, either add a space or don't add a space between the current character and the next character
Base case is when there are no more characters left to add spaces between
Time complexity is O(2^n) where n is the length of the string
Preorder traversal without recursion
Use a stack to keep track of nodes
Push right child first and then left child onto stack
Pop top of stack and print value
Repeat until stack is empty
Find longest continuous patch on a 12 km road with updates in patches
Maintain a variable to keep track of current patch length
Update the variable whenever a new patch is added
Maintain a variable to keep track of longest patch so far
Compare current patch length with longest patch length and update if necessary
Use a sorted data structure like a binary search tree to store the patches for efficient search
Time complexity: ...
Find median of an unsorted array.
Sort the array and find the middle element
Use quickselect algorithm to find the median in O(n) time
If the array is small, use brute force to find the median
Find 'k' elements closest to a given number from a stream of characters.
Use a priority queue to keep track of closest elements.
Update the queue as new characters come in.
Return the 'k' closest elements from the queue.
Design a data structure with O(1) insert, remove, find-max, and delete-max operations.
Use a doubly linked list to maintain the elements in sorted order.
Use a hash table to store the pointers to the nodes in the linked list.
Maintain a pointer to the maximum element in the hash table.
Update the pointers in the hash table when inserting or removing elements.
Update the maximum pointer when deleting or inserting the maximum
Check if a given linked list is a palindrome.
Traverse the linked list and store the values in an array.
Compare the first and last elements of the array, then move towards the center.
If all elements match, the linked list is a palindrome.
Alternatively, use two pointers to find the middle of the linked list and reverse the second half.
Compare the first half with the reversed second half to check for a palindrome.
I appeared for an interview before May 2021.
Round duration - 60 minutes
Round difficulty - Easy
It is online round and it was conducted around 11 AM on campus. Difficulty was medium. 2 coding questions were asked. One question is based on arrays(easy) and the other question is based on usage of oops concepts like Inheritance, polymorphism. Everything went smooth.
Given an array ARR
of N integers and an integer S, determine if there exists a contiguous subarray within the array with a sum equal to S. If such a subarray exis...
Given an array of integers, find a subarray with a given sum S.
Use a sliding window approach to find the subarray with the given sum.
Keep track of the current sum and adjust the window based on the sum.
Return the start and end indices of the subarray if found, otherwise return [-1, -1].
Round duration - 50 minutes
Round difficulty - Medium
Round started with self introduction and discussion of project. Everything went fine.
Note: we didn't have hr round due to time constraint. You can expect hr round.
Given an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Yo...
Find the duplicate number in an array of integers from 0 to (N-2).
Iterate through the array and keep track of the frequency of each number using a hashmap.
Return the number with a frequency greater than 1 as the duplicate number.
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization is used to eliminate data redundancy and ensure data integrity in a database.
There are different normal forms such as 1NF, 2NF, 3NF, BCNF, and 4NF.
Each normal form has specific rules that must be followed to ensure data is properly organized.
Normalization helps in reducing data anomalies and incon...
ACID properties are essential characteristics of a transaction in a database management system.
Atomicity ensures that either all operations in a transaction are completed successfully or none of them are.
Consistency ensures that the database remains in a valid state before and after the transaction.
Isolation ensures that the execution of multiple transactions concurrently does not interfere with each other.
Durability e...
OOP is a programming paradigm based on the concept of objects, which can contain data and code to manipulate that data.
OOP focuses on creating objects that interact with each other to solve complex problems.
Encapsulation: Objects can hide their internal state and require interactions through well-defined interfaces. Example: A car object with methods like start(), stop(), accelerate().
Inheritance: Objects can inherit a...
Tip 1 : Don't get frustrated if not selected, keep believing yourself.
Tip 2 : Prepare data structures and algorithms well. Practice coding daily. OOPS in any programming language will do. Prefer quality of codes to quantity.
Tip 3 : If possible do a project on full stack development.
Tip 1 : Keep it simple and try to adjust everything in one page. As a fresher it is better if you can have 2 projects in your cv.
Tip 2 : Don't add unnecessary details such as parents details.
I appeared for an interview in Oct 2020.
Round duration - 60 mins
Round difficulty - Medium
3 Questions were asked : 2- Trees and 1- Stack.
Interviewer was not receptive at all, I think this was a stress interview.
Given a binary tree with 'N' nodes, determine if it is a Binary Search Tree (BST). Return true
if the tree is a BST, otherwise return false
.
Validate if a given binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with values less than the node's value.
Check if the right subtree of a node contains only nodes with values greater than the node's value.
Ensure that both the left and right subtrees are also binary search trees.
Traverse the tree in-order and check if the elements are in sorted order.
Use a recurs...
Given a binary tree with 'N' nodes, transform it into a Greater Tree. In this transformation, each node's value should be updated to the sum of its original value and...
Convert a binary tree into a Greater Tree by updating each node's value to the sum of its original value and the values of all nodes greater than or equal to it.
Traverse the tree in reverse inorder (right, root, left) to update the nodes' values.
Keep track of the sum of nodes visited so far to update each node's value.
Recursively update the node's value by adding the sum of greater nodes to it.
You are given a string STR
containing only the characters "{", "}", "(", ")", "[", and "]". Your task is to determine if the parentheses in the string are balanced.
Th...
Check if the given string containing only parentheses is balanced or not.
Use a stack to keep track of opening parentheses.
Iterate through the string and push opening parentheses onto the stack.
When a closing parenthesis is encountered, pop from the stack and check if it matches the corresponding opening parenthesis.
If at the end the stack is empty, return 'YES' else return 'NO'.
Round duration - 60 mins
Round difficulty - Hard
2 Coding Questions were asked, both were of Medium to Hard Difficulty.
You are given a multi-level linked list containing 'N' nodes. Each node has 'next' and 'child' pointers that may or may not point to other nodes. Your task is to flatten th...
Flatten a multi-level linked list into a single linked list by rearranging the pointers.
Traverse the linked list and whenever a node has a child, flatten the child list and append it after the current node.
Update the 'next' and 'child' pointers accordingly while flattening the list.
Continue this process until all nodes are rearranged into a single linked list.
Given an array/list ARR
of size N
, representing an elevation map where each element ARR[i]
denotes the elevation of the i-th
bar. Your task is to calculate and print ...
Calculate the total amount of rainwater that can be trapped between given elevations in an elevation map.
Use two-pointer approach to keep track of left and right boundaries.
Calculate the trapped water by finding the minimum of left_max and right_max for each bar.
Subtract the current bar's height from the minimum of left_max and right_max to get the trapped water.
Keep updating the left_max and right_max as you iterate t
Round duration - 90 minutes
Round difficulty - Medium
Timing : It was late night.
How the interviewer was? He was very tired and I had to lead the discussion.
1 System Design Question was asked, had to provide - HLD, LLD, APIs.
Round duration - 60 minutes
Round difficulty - Medium
Timing : Afternoon
How was the environment? Home
Interviewer : Hiring Manager
Discussed about past Projects, challenges faced, disagreements with manager, why looking for job switch, leadership principle questions were asked.
Round duration - 60 minutes
Round difficulty - Medium
Timing - Afternoon
How was the environment? Home
How the interviewer was? Very Helpful Interviewer
Bar raiser Round - Coding + System Design + Leadership principle
Tip 1 : 250 Leetcode ( Easy- 70, Medium- 150, Hard- 30)
Tip 2 : Don't underestimate importance of good projects on your Resume.
Tip 3 : Be Confident.
Tip 1: Resume should not be more than 1 page.
Tip 2: Have Keywords on Resume that match Job descriptions.
I applied via Recruitment Consulltant and was interviewed before Apr 2021. There were 2 interview rounds.
2 coding questions
Hacker Rank test - 4 rounds (Coding, System Design and Work style assessment, Leadership Principles)
I applied via Company Website and was interviewed in Mar 2024. There were 2 interview rounds.
Amazon Online assessment which consisted of 2 coding DSA medium question
based on 1 interview
Interview experience
Software Development Engineer II
20
salaries
| ₹10 L/yr - ₹20 L/yr |
Software Development Engineer
16
salaries
| ₹6 L/yr - ₹18.5 L/yr |
Quality Analyst
13
salaries
| ₹4 L/yr - ₹9 L/yr |
Software Developer
12
salaries
| ₹6 L/yr - ₹12 L/yr |
Sdet Automation Test Engineer
7
salaries
| ₹4.5 L/yr - ₹11 L/yr |
TCS
Accenture
Wipro
Cognizant