Filter interviews by
I applied via Referral
Top trending discussions
posted on 15 Sep 2021
I appeared for an interview before Sep 2020.
Round duration - 75 minutes
Round difficulty - Easy
This was the coding round which consisted of three coding questions and the time limit was of 75 minutes. The platform used was Co-Cubes. 3 questions were asked of 2, 3 and 5 marks respectively with varying difficulty.
Given an integer N
, find the nearest multiple of 10. If there are multiple nearest multiples, return the smallest one.
The first line contains an integer ...
Given an integer, find the nearest multiple of 10. If multiple nearest multiples, return the smallest one.
Iterate through each test case
Calculate the remainder when dividing N by 10
If remainder is less than or equal to 5, nearest multiple is N - remainder
If remainder is greater than 5, nearest multiple is N + (10 - remainder)
Your task is to create a function that determines the day of the week for any given date, whether in the past or the future.
The first line consists of an integer 'T',...
Create a function to determine the day of the week for any given date.
Parse the input integers to create a date object
Use a library or algorithm to calculate the day of the week for the given date
Return the corresponding day of the week as a string
Given a singly linked list and two integers 'N' and 'M', traverse the linked list to retain 'M' nodes and then delete the next 'N' nodes. Continue this proces...
Traverse a linked list to retain 'M' nodes and then delete the next 'N' nodes, repeating until the end of the list.
Create a function that takes the head of the linked list, 'N', and 'M' as input parameters.
Traverse the linked list, retaining 'M' nodes and deleting the next 'N' nodes in each iteration.
Continue this process until the end of the linked list is reached.
Update the next pointers accordingly to skip 'N' nodes...
Round duration - 30 minutes
Round difficulty - Easy
This was a written round and we were expected to write fully functional code, without any bugs and errors. Library functions used if any, had to be explained and if possible, code for that too (not that rigorous). Pseudocode and algorithms were also allowed. All the assumptions made had to be explained as well.
The Look-And-Say sequence is a series of positive integers generated in a specific pattern:
1, 11, 21, 1211, 111221, 312211, 13112221,...
To construct this sequen...
The Look-And-Say sequence is a series of positive integers generated in a specific pattern based on the count of digits in the previous number.
Implement a function to generate the Nth term of the Look-And-Say sequence efficiently.
Use a loop to iterate through the sequence generation process.
Keep track of the count of consecutive digits in each number to generate the next number.
Handle the constraints of the number of t...
Given an array ARR
consisting of non-negative integers, rearrange the numbers to form the largest possible number. The digits within each number cannot be changed.
Rearrange the array elements to form the largest possible number by concatenating them.
Sort the array elements in a custom way to form the largest number.
Convert integers to strings for comparison while sorting.
Handle edge cases like leading zeros in the final number.
Example: For input [12, 5, 34], the output should be '53412'.
Round duration - 50 minutes
Round difficulty - Easy
The interviewer was very friendly and started asking me questions by making me comfortable.
You are provided with a directory path in Unix-style notation, and your task is to simplify it according to given rules.
In a Unix-style file system:
The task is to simplify a directory path in Unix-style notation according to given rules.
Use a stack to keep track of directories while iterating through the input path.
Handle cases for '.', '..', and multiple slashes to simplify the path.
Return the simplified path starting with a slash and without a trailing slash.
You are provided with two arrays representing the coefficients and degrees of a polynomial expression. Your task is to simplify this polynomial into its general...
Simplify a polynomial expression by combining like terms and arranging them in descending order of degrees.
Iterate through the coefficients and degrees arrays to combine like terms
Create a map to store coefficients based on degrees
Sort the map keys in descending order to get the simplified polynomial
Round duration - 40 minutes
Round difficulty - Easy
This round was focused on resume and projects
Round duration - 30 minutes
Round difficulty - Easy
This round was basically a mix of HR and creative design round. The interviewer wanted to check whether the candidate can think out-of-the-box with regard to any given problem and come up with unique, optimized solutions.
Tip 1 : I would suggest practicing as many questions on data structures and algorithms as you can because it is the question practice that would help you in building your concepts strong. I practiced a lot of questions on InterviewBit and completed all modules of data structures and algorithms because there you can find the recent interview questions that you should know.
Tip 2 : If you have time for your interviews, I would recommend going through Leetcode as it has a good variety of questions sorted on topic wise difficulty level where you can try to solve at least 20-30 questions for each data structure and algorithm. Moreover, you should regularly participate in the weekly contests happening there so that you could know about your weak areas to improve.
Tip 3 : Along with coding you should be clear about some basic concepts of Operating systems and Databases that would help in your interviews. One more thing is that do some good research about the company's goal and vision and be prepared to ask some company-related queries that show your interest in the company.
Tip 1 : Your Resume should consist of mainly skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development.
Tip 2 : The most important tip is that never lie on your resume and like If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.
posted on 19 Jan 2021
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)
posted on 16 Sep 2021
I appeared for an interview in Nov 2020.
Round duration - 90 minutes
Round difficulty - Medium
This round was conducted in Hackerrank portal for a total duration of 95 minutes and was divided into 4 sections.
1st Section : Aptitude Section : 14 questions , 28 minutes
2nd Section : Technical Section : 12 questions , 17 minutes
3rd Section :1 coding Questions : 20 minutes+30 minutes
You are provided with an array ARR
of positive integers. Each integer represents the number of liters of water in a bucket. The goal is to make the liters of water in ...
Given an array of water buckets, find the minimum liters of water to remove to make all buckets contain the same amount of water.
Iterate through the array to find the most common amount of water in the buckets.
Calculate the total liters of water that need to be removed to equalize all buckets to the most common amount.
Return the total liters of water to be removed.
You need to determine all possible paths for a rat starting at position (0, 0) in a square maze to reach its destination at (N-1, N-1). The maze is represented as an N*N ma...
Find all possible paths for a rat in a maze from source to destination.
Use backtracking to explore all possible paths in the maze.
Keep track of visited cells to avoid revisiting them.
Explore all possible directions (up, down, left, right) from each cell.
Add the current direction to the path and recursively explore further.
If the destination is reached, add the path to the list of valid paths.
Round duration - 120 Minutes
Round difficulty - Medium
This was an Online F2F Technical Round conducted on CodePair : Hackerrank. So, Basically You have to Run and Submit ( Pass All Test cases) in the Interview Round also (Like normal Coding Test) in Codepair : Hackerrank & along with that You should have to explain your Code and Approach to the Interviewers.
The Interviewers were helpful and didn't hesitate in giving hints.
Timing - 10:00 A.M to 12:00 P.M
In this problem, you have a one-dimensional garden of length 'N'. Each position from 0 to 'N' has a fountain that can provide water to the garden up to a certain range...
Find the minimum number of fountains to activate to water the entire garden.
Iterate through the array to find the coverage of each fountain.
Keep track of the farthest coverage reached by activating fountains.
Activate the fountain that covers the farthest point not yet covered.
Repeat until the entire garden is watered.
You are provided with a list of 'transactions' involving 'n' friends who owe each other money. Each entry in the list contains information about a receiver, sender, and the tran...
Minimize cash flow problem among friends by optimizing transactions.
Create a graph where nodes represent friends and edges represent transactions.
Calculate net amount each friend owes or is owed by summing up all transactions.
Use a recursive algorithm to minimize cash flow by settling debts between friends.
Update the graph and repeat the process until all debts are settled.
Round duration - 120 Minutes
Round difficulty - Hard
A lot of Variants based on Constraints were asked in this Round. They will ask you to write the final code for every question before Submitting it(run all test cases) so you won’t get any hints after running test cases in the IDE. ( So don’t Submit your code before dry running it on a lot of Test Cases on pen & paper , they allow to use pen & blank paper at the time of Interviews) .The Interviewers tried to trick in case of time complexities even if you gave the best one. So try to be confident.
Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell ...
The task is to determine the maximum profit that can be achieved by performing up to two buy-and-sell transactions on a given set of stock prices.
Iterate through the array of stock prices and keep track of the maximum profit that can be achieved by buying and selling at different points.
Maintain variables to store the maximum profit after the first transaction, the maximum profit after the second transaction, and the m...
Round duration - 30 minutes
Round difficulty - Easy
This was HR Round. The HR was friendly and asked basic questions.
The timing was 2:00 PM to 2:30 PM.
Tip 1 : Make sure that you are thorough with CS concepts beforehand.
Tip 2 : Even when you are explaining the approach to a question, try to parallelly think about how you would code it.
Tip 3 : Read the previous interview experiences. It would give a fair idea of the kind of questions one should expect.
Tip 4 : For position like Microsoft SDE-1, practicing medium difficulty level coding questions would be the way to go.
Tip 5 : Practice atleast 200 questions from coding platforms like CodeZen, LeetCode, Interviewbit as they contain common interview questions.
Tip 1 : Mention Projects and past work experience as it sets good impression.
Tip 2 : Keep your resume up to date for the role you are applying.
Tip 3 : Try to keep your resume of 1 Page.
I appeared for an interview before Sep 2020.
Round duration - 120 Minutes
Round difficulty - Easy
The round was conducted in day around 3PM.
Given an array ARR
consisting of 'N' positive integers, determine if it is possible to partition the array into two subsets such that the sum of the elements in both sub...
The problem is to determine if it is possible to partition an array into two subsets with equal sum.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the results of subproblems.
Check if the sum of the array is even before attempting to partition it.
Iterate through the array and update the 2D array based on the sum of subsets.
Return true if a subset with half the sum is found, false ot
Round duration - 30 Minutes
Round difficulty - Easy
The interview was preponed and was conducted at 9AM.
The interviewer was friendly and I had saw him earlier at pre-placement talk.
Given a string STR
, your task is to remove spaces from STR
and convert it to Pascal case format. The function should return the modified STR
.
In Pascal case, words are con...
Convert a given string to Pascal case format by removing spaces and capitalizing the first letter of each word.
Iterate through each character in the string
If the character is a space, skip it
If the character is not a space and the previous character is a space or it is the first character, capitalize it
SQL query to retrieve the Nth highest salary from a database
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT clause to retrieve the Nth highest salary
Consider handling cases where there might be ties for the Nth highest salary
Round duration - 30 Minutes
Round difficulty - Easy
This round was conducted 15mins after 1st round.
You are given a singly Linked List with 'N' nodes containing integer data and an integer 'K'. Your task is to delete the Kth node from the end of this Lin...
Remove the Kth node from the end of a singly linked list.
Traverse the list to find the length 'N'.
Calculate the position of the node to be removed from the beginning as 'N - K + 1'.
Remove the node at the calculated position.
Handle edge cases like removing the head or tail of the list.
Update the pointers accordingly after removal.
Tip 1 : Do Competitive Coding
Tip 2 : Learn at least 1 framework
Tip 3 : Build interest in computers
Tip 1 : Be well informed of everything you mention in your resume
Tip 2 : Mention competitive coding achivements in your resume(if any)
posted on 4 Mar 2021
I would like to develop a mobile application that helps people track their daily water intake.
The app would allow users to set daily water intake goals and track their progress throughout the day.
It could also provide reminders to drink water and offer tips for staying hydrated.
The app could integrate with wearable devices to automatically track water intake.
Users could also log the type of water they are drinking, suc...
I applied via Company Website and was interviewed in Nov 2020. There was 1 interview round.
I appeared for an interview before Sep 2020.
Round duration - 60 minutes
Round difficulty - Easy
There was 2 coding questions
Based on ds and algorithms
Ninja, who loves playing with numbers, sets out to arrange numbers within 'N' rows. The unique arrangement follows these rules: the first row contains 1 number, the second...
Generate a pattern of numbers in rows following a specific sequence based on powers of 2.
Start with 1 number in the first row, 2 numbers in the second row, 4 numbers in the third row, and so on based on powers of 2.
Fill the pattern with numbers in increasing sequence from 1 to 9, recycling back to 1 after reaching 9.
Output the pattern for a given number 'N' of rows.
Example: For N = 4, the pattern would be 1, 23, 4567,
You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).
A Binary Search Tr...
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 data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Recursively check if both the left and right subtrees are also binary search trees.
Example: For a node with data 4, left subtree nodes (2, 1, 3) are smaller and righ
Round duration - 60 minutes
Round difficulty - Easy
There was 2 coding questions based on ds and algorithms
You are provided with an array of distinct elements, and your task is to rearrange the array elements in a zig-zag manner. Specifically, for every odd index i
, the element ARR[...
Rearrange array elements in a zig-zag manner where every odd index element is greater than its neighbors.
Iterate through the array and swap elements to satisfy the zig-zag condition.
Ensure that for every odd index i, ARR[i] > ARR[i-1] and ARR[i] > ARR[i+1].
Multiple correct answers may exist for a given array.
You are provided with a linked list of 'N' nodes. Each node contains two pointers: NEXT
, pointing to the next node in the list, and CHILD
, pointing to a linked list. Each child linke...
Flatten a linked list of sorted child linked lists into a single sorted linked list.
Traverse the linked list and maintain a priority queue to keep track of the next smallest element.
Merge the child linked lists into the priority queue while traversing the main linked list.
Pop elements from the priority queue to create the final flattened linked list.
Round duration - 45 Minutes
Round difficulty - Medium
My interview started at 9:30 and it took around 45 minutes to complete my interview.This was held on Amazon Chime and the interview lasted for 1 hour. Firstly the interviewer asked to introduce about myself, later asked regarding the projects I have mentioned in my resume. Then started displaying the coding question. The first question is number of islands in a matrix.
You are provided with a 2-dimensional matrix having N
rows and M
columns, containing only 1s (land) and 0s (water). Your goal is to determine the number of islands in t...
Count the number of islands in a 2D matrix of 1s and 0s.
Use Depth First Search (DFS) or Breadth First Search (BFS) to traverse the matrix and identify connected groups of 1s.
Maintain a visited array to keep track of visited cells to avoid redundant traversal.
Increment the island count each time a new island is encountered.
Consider edge cases like when the matrix is empty or all cells are water (0s).
Tip 1 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume.
Tip 2 : You should be able to answer each and every thing present in your resume. Don't lie in your resume.
Tip 3 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems
Tip 1 : Mention your skills in which you are perfect
Tip 2 : Mention atleast two projects
I appeared for an interview in Sep 2020.
Round duration - 90 Minutes
Round difficulty - Easy
Two coding questions were asked and 90 minutes of time was allotted to solve both the problems
Given an array of integers ARR
of length N
and an integer Target
, your task is to return all pairs of elements such that they add up to the Target
.
The first line ...
Given an array of integers and a target, find all pairs of elements that add up to the target.
Iterate through the array and for each element, check if the target minus the element exists in a hash set.
If it exists, add the pair to the result. If not, add the element to the hash set.
Handle cases where the same element is used twice to form a pair.
Return (-1, -1) if no pair is found.
Given a binary matrix of size N * M
where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only...
Find the shortest path in a binary matrix from a source cell to a destination cell consisting only of 1s.
Use Breadth First Search (BFS) algorithm to find the shortest path in the binary matrix.
Keep track of visited cells to avoid revisiting them.
Update the path length as you traverse the matrix.
Return -1 if no valid path exists from source to destination.
Round duration - 60 Minutes
Round difficulty - Medium
The duration was approx 1 hour. The interview was taken by a young SDE-2.
You are given a string 'S' of length 'N'. Your task is to find the frequency of each character from 'a' to 'z' in the string.
S : abcdg
1...
The task is to find the frequency of each character from 'a' to 'z' in a given string.
Create an array of size 26 to store the frequency of each character from 'a' to 'z'.
Iterate through the string and increment the count of the corresponding character in the array.
Print the array of frequencies as the output.
Given a matrix MAT
of size N * M
, where each cell is either on fire or safe, determine if a person can reach an escape cell without being burnt. The person starts from ...
Determine if a person can reach an escape cell without encountering fire in a matrix.
Check if the person can reach an escape cell without encountering fire by simulating the movement of the person and fire spread.
If the person can reach an escape cell, return the time taken; otherwise, return -1.
Consider the constraints and edge cases while implementing the solution.
Round duration - 60 Minutes
Round difficulty - Hard
The interviewer introduced himself and asked me to introduce myself.
I told him about the different projects that I had done and the work in the previous company.
I had worked on AWS(Amazon Web Services) so he asked me all the AWS services that I had worked with and to explain one of them.
I explained about the working of ECS(Elastic Container Service).
After this, he moved to the coding questions.
Given a binary matrix of size N*M, find the maximum distance 'di' for every 0-cell to its nearest 1-cell, where the distance is measured using Manhattan distance. Th...
Find the maximum Manhattan distance from a 0-cell to its nearest 1-cell in a binary matrix.
Iterate through the matrix to find all 0-cells and calculate their distances to nearest 1-cells using Manhattan distance formula
Keep track of the maximum distance found so far and update it if a larger distance is encountered
Return the maximum distance as the final result
You are provided with an array containing 'N' non-negative integers, along with two other non-negative integers 'K' and 'M'. Your task is to identify ...
Find a pair of indices in an array with given difference and distance constraints.
Iterate through the array and check all possible pairs of indices to satisfy the conditions
Use nested loops to compare each pair of indices and their corresponding elements
Return 'valid' if a pair of indices is found that meets the conditions, otherwise return 'invalid'
Round duration - 60 Minutes
Round difficulty - Medium
The interviewer was a very senior person with at least 10-15 years of experience. He introduced himself and asked me to tell him about myself. (Leadership principle questions followed)
Determine whether an arbitrary binary tree is special. A binary tree is called special if every node in this tree has either zero or two children.
...
Determine if a binary tree is special if every node has zero or two children.
Traverse the tree and check if each node has either 0 or 2 children.
Use a recursive approach to check children of each node.
If any node has only one child, return false immediately.
Example: For the given input, the output should be true.
Round duration - 60 Minutes
Round difficulty - Medium
The interview started with introductions and some Leadership principle questions. The interviewer was again a senior person with at least 10-15 years of experience.
I was asked to explain some AWS services.
He asked me to tell about a time when I had a tight deadline and how I worked during it.
He asked me about a time when I took initiative and came up with something new which helped the entire team.
I had prepared well for the LP questions and was able to answer everything.
After this, we move on to coding questions.
Determine if a given word 'W' is present in the sentence 'S' as a complete word. The word should not merely be a substring of another word.
The first line contains an in...
Check if a given word is present in a sentence as a complete word.
Split the sentence into words using spaces as delimiter.
Check if the given word matches any of the words in the sentence.
Ensure that the word is not just a substring of another word in the sentence.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Use a combination of hashmap and doubly linked list to implement the LRU cache.
Keep track of the least recently used item and update it accordingly.
Ensure to handle cache capacity by evicting the least recently used item when the cache is full.
Tip 1 : Start with the basics if you have lost touch with competitive coding. Don't directly jump to interview questions.
Tip 2 : Create a timetable and set goals. Keep aside 3-4 hours for studying. Consistency is the key.
Tip 3 : Focus on medium and hard questions. Solving a lot of easy questions doesn't help.
Tip 1 : You should have good projects to showcase.
Tip 2 : Keep it clean and simple.
Technical Recruiter
9
salaries
| ₹1.5 L/yr - ₹3.8 L/yr |
Senior Software Engineer
7
salaries
| ₹5.5 L/yr - ₹18 L/yr |
Software Developer
5
salaries
| ₹3.5 L/yr - ₹5.1 L/yr |
Junior Software Developer
5
salaries
| ₹3 L/yr - ₹7 L/yr |
Senior Technical Recruiter
5
salaries
| ₹2.7 L/yr - ₹3.7 L/yr |
Teleperformance
Concentrix Corporation
Amazon
iEnergizer