Filter interviews by
I applied via Campus Placement and was interviewed in Feb 2024. There were 2 interview rounds.
In round 1, there were 30 mcq questions to check the reasoning ability
It was ZAM round which stands for just a minute round.
Interviewer gives one minute to speak on a topic and interview will judge your communication skill.
Numerical reasoning
Mathematical
Logically
The language is java programming language
Top trending discussions
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Easy
This was an online technical round on the mettl platform, the test window was open from 22 to 25 May 2020
The test had 28 mcqs and 2 coding questions.
The test was proctored. One needed to have webcam on.
A sample test link was provided before test to get familiar with the mettl platform.
Given an integer array ARR
of size N
, your task is to find the total number of inversions that exist in the array.
An inversion is defined for a pair of integers in the...
Count the total number of inversions in an integer array.
Iterate through the array and for each pair of elements, check if the conditions for inversion are met.
Use a nested loop to compare each pair of elements efficiently.
Keep a count of the inversions found and return the total count at the end.
Given an array of positive integers, your task is to find the GCD (Greatest Common Divisor) of a pair of elements such that it is the maximum among all possible pair...
Find the pair with the maximum GCD in an array of positive integers.
Iterate through all pairs of elements in the array.
Calculate the GCD of each pair using Euclidean algorithm.
Keep track of the maximum GCD found so far.
Return the maximum GCD value.
Round duration - 60 minutes
Round difficulty - Medium
Time : 12pm to 1pm
Mode of Interview : Amazon Chime Video
LiveCode : To write code, it was not a compiler
The interviewer was quite supportive.
Given an array/list 'ARR' consisting of 'N' integers, your task is to find the majority element in the array. If there is no majority element present, return -1.
Find the majority element in an array, return -1 if no majority element exists.
Iterate through the array and keep track of the count of each element using a hashmap.
Check if any element's count is greater than floor(N/2) to determine the majority element.
Return the majority element or -1 if no majority element exists.
You are provided with an array/list ARR
of length N
containing only 0s and 1s. Your goal is to determine the number of non-empty subarrays where the numbe...
Count the number of subarrays where the number of 0s is equal to the number of 1s in a given array of 0s and 1s.
Iterate through the array and keep track of the count of 0s and 1s encountered so far.
Use a hashmap to store the difference between the counts of 0s and 1s seen at each index.
Increment the count of subarrays whenever the difference between the counts seen before matches the current difference.
Round duration - 60 minutes
Round difficulty - Medium
Time : 11 am to 12am
Mode of Interview : Amazon Chime Video
LiveCode : To write code, it was not a compiler
The interviewer was quite supportive.
Given a singly linked list where nodes contain values in increasing order, your task is to convert it into a Balanced Binary Search Tree (BST) using th...
Convert a sorted linked list into a Balanced Binary Search Tree (BST) using the same data values.
Create a function to convert the linked list to an array for easier manipulation.
Implement a function to build a Balanced BST from the array recursively.
Ensure the height difference of the subtrees is no more than 1 for each node.
Use level order traversal to output the values of the BST nodes.
Handle NULL nodes by representi
Your task is to implement a Stack data structure using a Singly Linked List.
Create a class named Stack
which supports the following operations, each in O(1...
Implement a Stack data structure using a Singly Linked List with operations in O(1) time.
Create a class named Stack with getSize, isEmpty, push, pop, and getTop methods.
Use a Singly Linked List to store the elements of the stack.
Ensure each operation runs in O(1) time complexity.
Handle edge cases like empty stack appropriately.
Test the implementation with sample queries to verify correctness.
Tip 1 : Practice questions from all the topics as much as possible
Tip 2 : Be very much attentive while doing projects in college or anywhere, they are asked in detail if mentioned in resume.
Tip 3 : Be consistent while practicing and do a variety of questions rather than doing more questions of same kind.
Tip 1 : You should know whatever you have mentioned in your resume. Don't brag in your resume ever. Be very precise. It doesn't matter how much you have done, what matters is you are very much confident and clear about what you have done.
Tip 2 : Put your projects and the language you code in for sure in your resume.
I appeared for an interview in Sep 2020.
Round duration - 215 minutes
Round difficulty - Medium
* Debugging(C, C++, Java, Python) [Time given was quite enough.]
* Coding(Any programming language was allowed. 2 coding questions medium to difficult level 70 mins)
* Psychometric test based on Leadership principle — Don’t take it for granted. I would suggest to pay attention while
answering to this as well.
* Aptitude and Logical reasoning (Good enough time was given.)
You are given an integer 'N'. Your task is to print a specific pattern for the given number of rows 'N'.
The first line contains a single integer ‘T’ repres...
Print a specific pattern of '1's for a given number of rows 'N'.
Read the number of test cases 'T'
For each test case, read the number of rows 'N'
Print '1' repeated i times for each line i from 1 to N
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 complement (target - current element) exists in a hash set.
If the complement exists, add the pair to the result. Otherwise, add the current element to the hash set.
Handle cases where the same element is used twice in a pair.
Return (-1, -1) if no pair is found.
Round duration - 60 minutes
Round difficulty - Medium
(Time — 5.30 p.m.): I introduced myself. My interviewer told me that he would divide the interview into three phases.
Phase 1- Introduction and questions on life instances where I proved my efficiency. (barely 10 minutes, I answered well.)
Phase 2- Data Structures’ Understanding and questions related to it. (Hashing concept and complete conceptual details about it. Internal working, collisions, how to avoid them etc.) (15 minutes, He was satisfied with my answers. Don’t just answer. Explain !)
Given a string Str
consisting of N
lowercase Latin letters, you need to determine the longest substring without repeating characters.
A substring is defined as ...
Given a string, find the longest substring without repeating characters.
Use a sliding window approach to keep track of the longest substring without repeating characters.
Use a hashmap to store the index of each character as it appears in the string.
Update the start index of the window when a repeating character is found.
Keep track of the longest substring length and its starting index.
Return the substring starting from...
Round duration - 70 minutes
Round difficulty - Hard
(Time — 7.00 p.m.): I introduced myself. The interviewer directly jumped onto the questions. He asked me two questions. The first question he asked me was: Coding Question
Given a string S
of length N
and an integer K
, find the length of the longest substring that contains at most K
distinct characters.
The first...
Find the length of the longest substring with at most K distinct characters in a given string.
Use a sliding window approach to keep track of the characters and their counts within the window.
Maintain a hashmap to store the characters and their frequencies.
Update the window size and characters count as you iterate through the string.
Return the maximum window size encountered for each test case.
Given a positive integer N
, compute the total number of '1's in the binary representation of all numbers from 1 to N. Return this count modulo 1e9+7 because the result can...
Count the total number of set bits in the binary representation of numbers from 1 to N modulo 1e9+7.
Use bitwise operations to count the set bits in each number from 1 to N.
Consider using dynamic programming to optimize the solution.
Remember to return the count modulo 1e9+7 to handle large results.
Tip 1 : Focus on medium and hard questions. Solving a lot of easy questions doesn't help.
Tip 2 : Start with the basics if you have lost touch with competitive coding. Don't directly jump to interview questions.
Tip 3 : Create a timetable and set goals. Keep aside 3-4 hours for studying. Consistency is the key.
Tip 1 : Keep it clean and simple.
Tip 2 : You should have good projects to showcase
I appeared for an interview before Sep 2020.
Round duration - 2 hour 30 mins
Round difficulty - Easy
Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...
Given a sorted N * N matrix, find the position of a target integer X within the matrix.
Iterate over each row and column to search for the target integer X
Utilize the sorted nature of the matrix to optimize the search process
Return the position of X if found, else return -1 -1
Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...
Cloning a linked list with random pointers by creating new nodes rather than copying references.
Create a deep copy of the linked list by iterating through the original list and creating new nodes with the same values.
Update the random pointers of the new nodes by mapping the original node's random pointer index to the corresponding new node.
Ensure the cloned linked list is an exact copy of the original by validating th...
Round duration - 60 minutes
Round difficulty - Medium
Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.
You are provided with a 2D array having dimensions 'N*M'. Your task is to traverse the elements row-wise and return a single-dimensional array which stores these ...
Traverse a 2D array row-wise and return elements in a wave pattern.
Traverse the 2D array row-wise and store elements alternately in a wave pattern.
For each row, store elements from left to right for odd rows and from right to left for even rows.
Return the final 1D array representing the wave pattern of elements.
Given two lists, one representing the preorder traversal ('PRE') of a strict binary tree and the other ('TYPENL') indicating if each node is a leaf ('L') or non-leaf ('N')....
Construct a strict binary tree from preorder traversal and leaf/non-leaf indicators.
Create a binary tree node class with value and left/right pointers.
Use a stack to keep track of parent nodes while constructing the tree.
Check if the current node is a leaf or non-leaf based on 'TYPENL' list.
Round duration - 60 minutes
Round difficulty - Medium
My interviewer introduced himself in the beginning and asked for my introduction.
You've been provided with a sorted dictionary in an alien language. Your task is to determine the character order of this alien language from this dictionary. The dictio...
Given a sorted dictionary in an alien language, determine the character order of the language.
Iterate through the dictionary to find the order of characters based on their appearance in words.
Create a graph of characters and their relationships based on adjacent words in the dictionary.
Perform a topological sort on the graph to determine the character order.
Return the list of characters in the correct order as the outp
Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and Be clear
Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus
I appeared for an interview before Sep 2020.
Round duration - 45 minutes
Round difficulty - Medium
The first Round was held on Hackerrank and the questions were of medium difficulty based on Data Structures and Algorithms.
The time of test was 1:00 PM and it was of 45 minutes with 2 coding questions to be solved.
Given a specified number of intervals, where each interval is represented by two integers denoting its boundaries, the task is to merge all overlapping interv...
Merge overlapping intervals and return sorted list of merged intervals.
Identify overlapping intervals based on start and end times
Merge overlapping intervals to form new intervals
Sort the merged intervals in ascending order of start times
Consider 'N' individuals standing in a circle, numbered consecutively from 1 to N, in a clockwise direction. Initially, the person at position 1 starts counting and will skip K-...
The Josephus problem involves eliminating individuals in a circle until only one remains, based on a specific counting rule.
Start counting from position 1, skip K-1 individuals, eliminate the Kth person, and continue until only one person remains.
The position of the last surviving person can be determined based on the initial numbering and the value of K.
Example: For N=5 and K=2, the last person standing is at position
Round duration - 75 minutes
Round difficulty - Medium
A google Doc was shared with us and we were supposed to write code there.
Use of IDEs was not allowed so we had to write correct code on Google Docs which was later checked by them through online IDEs.
The Interviewer were friendly and observative and helped us through code if we made some silly error.
You are given an array/list HEIGHTS
of length N
, where each element represents the height of a histogram bar. The width of each bar is considered to be 1.
Compute the area of the largest rectangle that can be formed within the bounds of a given histogram.
Iterate through the histogram bars and maintain a stack to keep track of increasing heights.
Calculate the area of the rectangle formed by each bar as the smallest height in the stack times the width.
Update the maximum area found so far.
Time complexity can be optimized to O(N) using a stack-based approach.
Given a binary tree of integers, your task is to return the boundary nodes of the tree in Anti-Clockwise direction starting from the root node.
The first line ...
Return the boundary nodes of a binary tree in Anti-Clockwise direction starting from the root node.
Traverse the left boundary nodes in top-down order
Traverse the leaf nodes in left-right order
Traverse the right boundary nodes in bottom-up order
Handle duplicates in boundary nodes by including them only once
Round duration - 60 minutes
Round difficulty - Medium
The face to face round was held on Google Meet where initially Interviewer asked a DS/Algo problem and then Later Manager Joined and asked about our resume projects in detail.
The time was 10:00 AM
Given an M x N matrix of integers ARR
, your task is to identify the rectangle within the matrix that has the greatest sum of its elements.
The first line of input co...
Find the rectangle within a matrix with the greatest sum of elements.
Iterate through all possible rectangles within the matrix and calculate their sums
Use Kadane's algorithm to find the maximum sum subarray for each row combination
Keep track of the maximum sum found so far
You are provided with a sorted array that has undergone 'K' rotations (the exact value of 'K' is unknown). A rotation involves shifting each element of the array to the right,...
Find the minimum number in a rotated sorted array efficiently.
Use binary search to find the minimum element in the rotated array.
Compare mid element with the last element to determine which half to search.
Adjust the search space based on the comparison to find the minimum element efficiently.
Tip 1 : Prepare OS,DBMS,OOPs too
Tip 2 : Mention atleast one project or past work experience in your resume
Tip 3 : Try maintaining 8+ CGPA as sometimes shortlist is done based on CGPA
Tip 4 : Try past interview questions from Leetcode,Interviewbit.
Tip 1 : Try to Keep Resume 1 Pager
Tip 2 : Have atleast one project or past work experience mentioned
Tip 3 : Don't put false things on Resume as questions are asked in detail from Resume
I applied via Company Website and was interviewed before Nov 2021. There were 2 interview rounds.
Find the cousin of a node in a binary tree.
Cousins are nodes at the same level but with different parents.
Traverse the tree to find the level and parent of the given node.
Traverse the tree again to find all nodes at the same level with different parents.
Return the cousin node if found, else return null.
I appeared for an interview before Sep 2020.
Round duration - 150 Minutes
Round difficulty - Easy
Debugging: This section had 7 debugging problems, which consist of code snippets that have some logical error that needs to be rectified.
Reasoning Ability: This section consists of some verbal reasoning questions and some aptitude questions.
Coding: This section consists of 2 coding problems.
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...
Given a sorted N * N matrix, find the position of a target integer 'X'.
Iterate over each row and column to search for the target integer 'X'.
Utilize the sorted nature of the matrix to optimize the search process.
Return the position of 'X' if found, else return '-1 -1'.
Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or ...
Deep copy a linked list with random pointers and return its head. Validate if the cloned linked list is an exact copy of the original.
Create a new node for each node in the original linked list and maintain a mapping between original and cloned nodes.
Update the next and random pointers of the cloned nodes based on the mapping.
Time complexity: O(N) where N is the number of nodes in the linked list.
Space complexity: O(N)...
Round duration - 60 minutes
Round difficulty - Medium
Around 30 candidates were shortlisted from my campus and over 150+ candidates were shortlisted from the university, and I was one of them. Then my first round of interviews was scheduled. I was pretty nervous before the interview.
Given a 2D array with dimensions N*M
, your task is to read the array elements in a row-wise manner and return a linear array that stores the elements in a 'wave' pattern. S...
Given a 2D array, return a linear array storing elements in a 'wave' pattern.
Read the array elements row-wise and store in wave pattern
Alternate direction for storing elements from each row
Handle edge cases like single row or single column arrays
Use nested loops to iterate through the 2D array
Given an array/list of integers PRE
representing the preorder traversal of a strict binary tree, and an array/list TYPENL
with values 'L' or 'N', where 'L' denotes a...
Given preorder traversal and node type information, construct a strict binary tree and return the root node.
Create a binary tree using preorder traversal and node type information
Use recursion to construct the tree
Handle leaf and non-leaf nodes separately
Ensure each node has 0 or 2 children
Round duration - 60 minutes
Round difficulty - Medium
My interviewer introduced himself in the beginning and asked for my introduction.
You are provided with a sorted dictionary (by lexical order) in an alien language. Your task is to determine the character order of the alien language from this dictiona...
Given a sorted alien dictionary in an alien language, determine the character order of the language.
Iterate through the dictionary to build a graph of character dependencies.
Perform a topological sort on the graph to determine the character order.
Return the character array representing the order of characters in the alien language.
Tip 1 : Practice ds and algo
Tip 2 : Be confident
Tip 3 : Speak out loud and be clear
Tip 1 : Mention only what you know
Tip 2 : Having Cp ranks is a plus
I appeared for an interview before Sep 2020.
Round duration - 90 MINUTES
Round difficulty - Medium
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calcula...
The task is to calculate the total number of unique paths from the top-left to bottom-right cell of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell (i, j), the number of unique paths is the sum of paths f...
Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This...
Find the length of the longest strictly increasing subsequence in an array of integers.
Use dynamic programming to solve this problem efficiently.
Initialize an array to store the length of the longest increasing subsequence ending at each index.
Iterate through the array and update the length of the longest increasing subsequence for each element.
Return the maximum value in the array as the length of the longest increasi
Round duration - 60 minutes
Round difficulty - Hard
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.There were 2 interviewers. Then started displaying the coding question. The first question is related to Matrices. Find a pair with maximum product in array of Integers.The second question is Given an treeWrite a Program to Find the Maximum Depth or Height of a Tree.After solving both the questions in the optimized approach, the interviewer asked me for the 3rd question because we were still having time. The third question is Given a string with no separator, find the missing number in the string.The interviewer was very friendly.
Given an array of integers, determine the contiguous subarray that produces the maximum product of its elements.
A subarray can be derived from th...
Find the contiguous subarray with the maximum product of elements in an array.
Iterate through the array and keep track of the maximum and minimum product ending at each index.
Update the maximum product by taking the maximum of current element, current element * previous maximum, and current element * previous minimum.
Update the minimum product by taking the minimum of current element, current element * previous maximum...
You are provided with the Inorder and Level Order traversals of a Binary Tree composed of integers. Your goal is to determine the height of this Binary Tree without actually construc...
Calculate the height of a Binary Tree using Inorder and Level Order traversals without constructing the tree.
Use the properties of Inorder and Level Order traversals to determine the height of the Binary Tree.
The height of a Binary Tree is the number of edges on the longest path from the root to a leaf node.
Consider edge cases like a single node tree or empty tree while calculating the height.
You have a sequence of consecutive nonnegative integers. By appending all integers end-to-end, you formed a string S
without any separators. During this pro...
Find the missing number in a string of consecutive nonnegative integers.
Iterate through the string to find the missing number by checking the consecutive integers.
If there is more than one missing number, all integers are present, or the string is invalid, return -1.
Handle cases where the missing number is at the beginning or end of the string.
Consider edge cases such as single-digit strings or strings with leading zer
Tip 1 : Regular coding practice on GFG, Leetcode and coding ninjas type platforms( Don't be nervous if you wont get in one try.Try until you get)
Tip 2 : Be enough confident, Do not loose hope,Maintain atleast 2 projects in your resume.
Tip 3 : Even if you are stuck in the problem, just give a try. The interviewer will help you definitely for sure.
Tip 1 : Make Sure that your resume is simple and also try to fit all the information in only one page.
Tip 2 : Have atleast 2 projects with the latest technologies,Github link of projects should be provided
I appeared for an interview before Sep 2020.
Round duration - 180 minutes
Round difficulty - Easy
The online round consisted of 2 coding questions based on data structures and algorithms, 30 aptitude MCQs, 30 behavioral MCQs and 10 code snippets to debug. The coding questions were of medium level, aptitude MCQs were easy and the code snippets to debug was also of easy level. Each section was timed.
You are provided with a singly linked list of integers. Your task is to determine whether the given singly linked list is a palindrome. Return true
if it is a pali...
Check if a given singly linked list is a palindrome or not.
Use two pointers approach to find the middle of the linked list
Reverse the second half of the linked list
Compare the first half with the reversed second half to determine if it's a palindrome
You are located at point ‘A’, the top-left corner of an M x N matrix, and your target is point ‘B’, the bottom-right corner of the same matrix. Your task is to calcula...
Calculate total unique paths from top-left to bottom-right corner of a matrix by moving only right or down.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of unique paths for each cell.
Initialize the first row and first column with 1 as there is only one way to reach them.
For each cell, the number of unique paths is the sum of the paths from the cell above and the cell to...
Round duration - 50 minutes
Round difficulty - Easy
The interview was early in the morning at 9 am. We turned on our videos and the interviewer asked for my introduction. She was helpful and provided me with hints whenever I needed. The interview was taken on Amazon chime and she also shared a link where I can write the code. It could be editable by both of us.
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.
Tip 1 : You must confidence over Data Structures and its concepts. Pick one coding platform and try to practice at least 5-6 coding questions everyday. I completed around 200+ questions on Leetcode, 200+ questions on Geek For Geeks.
Tip 2 : Not attempting the question is enough. try to analyze its time and space complexity. See, if you can further optimize your solution. Sometimes the interviewer asks only one question and keep on increasing its difficulty by asking for its optmization.
Tip 3 : Apart from coding questions keep studying concepts of Operating Systems, databases and object oriented programming. You can always refer to Geeks For Geeks articles for it. Also, Coding Ninja's Data Structures and algorithms course in C++ helped me a lot in improving my OOPS concepts specifically.
Tip 1 : Do not mention any skills, projects or achievements which you haven't completed yourselves. If you are not able to answer the basic questions it leaves a bad impact.
Tip 2 : You do need to have a lot of projects. Only one good project with proper knowledge is also fine. The same goes for the skills as well.
Tip 3 : Try to write achievements which shows your technical skills, communication skills, leadership quality or teamwork.
based on 2 interviews
Interview experience
based on 5 reviews
Rating in categories
Intern
51
salaries
| ₹1 L/yr - ₹5 L/yr |
Fullstack Developer Intern
9
salaries
| ₹1 L/yr - ₹5 L/yr |
Full Stack Developer
7
salaries
| ₹1 L/yr - ₹4 L/yr |
Java Full Stack Developer
6
salaries
| ₹1 L/yr - ₹4 L/yr |
fresher
5
salaries
| ₹1 L/yr - ₹3 L/yr |
TCS
Accenture
Wipro
Cognizant