Filter interviews by
I am very confident in Java programming.
I have completed multiple projects using Java.
I have experience with various Java frameworks such as Spring and Hibernate.
I am familiar with Java design patterns and best practices.
I have also contributed to open source Java projects.
I am constantly learning and improving my Java skills.
C language has basic data types like int, char, float, double, void, and derived data types like arrays, pointers, and structures.
Basic data types include int, char, float, double, and void
Derived data types include arrays, pointers, and structures
Arrays can be of any basic data type
Pointers are used to store memory addresses
Structures are used to group related data of different data types
Yes, some libraries are required for C programming such as stdio.h, math.h, string.h, etc.
stdio.h library is used for input/output operations
math.h library is used for mathematical operations
string.h library is used for string manipulation operations
To start a program in C language, we need to write a main function and compile the code.
Write the main function with the code to be executed
Compile the code using a C compiler
Execute the compiled program
Optionally, pass command line arguments to the program
An algorithm is a step-by-step procedure or set of rules for solving a problem or accomplishing a task.
An algorithm is a well-defined computational procedure.
It consists of a sequence of instructions that are executed in a specific order.
Algorithms can be represented using pseudocode, flowcharts, or programming languages.
They are used in various fields like computer science, mathematics, and engineering.
Examples o...
Call by value passes a copy of the value, while call by reference passes a reference to the original value.
Call by value creates a new copy of the value, so changes made inside the function do not affect the original value.
Call by reference passes a reference to the original value, so changes made inside the function affect the original value.
In call by value, the function works with a local copy of the variable.
I...
printf() and scanf() are functions in the C programming language used for input and output operations.
printf() is used to print formatted output to the console.
scanf() is used to read formatted input from the console.
Both functions are part of the standard input/output library in C.
printf() uses format specifiers to control the output format.
scanf() uses format specifiers to match and extract input values.
Data structures are a way of organizing and storing data in a computer so that it can be accessed and manipulated efficiently.
Data structures are used to store and organize data in a computer.
They provide a way to efficiently access and manipulate the stored data.
Examples of data structures include arrays, linked lists, stacks, queues, trees, and graphs.
The float data type represents a single-precision 32-bit floating-point number.
Range: approximately ±1.4e-45 to ±3.4e+38
Precision: 6-7 decimal digits
Smallest positive value: 1.17549435e-38
Largest positive value: 3.40282347e+38
A prime number is a number greater than 1 that is divisible only by 1 and itself.
Start with a number greater than 1
Check if the number is divisible by any number from 2 to its square root
If it is divisible by any number, it is not prime
If it is not divisible by any number, it is prime
Given a list aptitude questions
Given some java questions
I applied via Referral and was interviewed in Jan 2023. There were 2 interview rounds.
I developed a project using Python and machine learning to analyze and predict trends in electronic devices.
Created a predictive model using Python and scikit-learn to forecast device sales.
Utilized data visualization libraries like Matplotlib to present findings.
Implemented a web application using Flask to showcase the project.
Collaborated with peers to gather requirements and improve the project.
To start a program in C language, we need to write a main function and compile the code.
Write the main function with the code to be executed
Compile the code using a C compiler
Execute the compiled program
Optionally, pass command line arguments to the program
Yes, some libraries are required for C programming such as stdio.h, math.h, string.h, etc.
stdio.h library is used for input/output operations
math.h library is used for mathematical operations
string.h library is used for string manipulation operations
printf() and scanf() are functions in the C programming language used for input and output operations.
printf() is used to print formatted output to the console.
scanf() is used to read formatted input from the console.
Both functions are part of the standard input/output library in C.
printf() uses format specifiers to control the output format.
scanf() uses format specifiers to match and extract input values.
Access modifiers determine the visibility and accessibility of classes, methods, and variables in object-oriented programming.
Access modifiers are keywords used in programming languages like Java, C++, and C#.
They control the visibility and accessibility of classes, methods, and variables.
Common access modifiers include public, private, protected, and default (package-private).
Public access allows unrestricted access f...
A prime number is a number greater than 1 that is divisible only by 1 and itself.
Start with a number greater than 1
Check if the number is divisible by any number from 2 to its square root
If it is divisible by any number, it is not prime
If it is not divisible by any number, it is prime
Call by value passes a copy of the value, while call by reference passes a reference to the original value.
Call by value creates a new copy of the value, so changes made inside the function do not affect the original value.
Call by reference passes a reference to the original value, so changes made inside the function affect the original value.
In call by value, the function works with a local copy of the variable.
In cal...
Structure refers to the arrangement or organization of elements in a system or program.
Structure defines the layout and relationships between different components.
In software development, structure can refer to the organization of code, such as using classes, functions, and modules.
Structures can also be data types that group related data together, like structs in C or classes in object-oriented programming.
Structures ...
The float data type represents a single-precision 32-bit floating-point number.
Range: approximately ±1.4e-45 to ±3.4e+38
Precision: 6-7 decimal digits
Smallest positive value: 1.17549435e-38
Largest positive value: 3.40282347e+38
C language has basic data types like int, char, float, double, void, and derived data types like arrays, pointers, and structures.
Basic data types include int, char, float, double, and void
Derived data types include arrays, pointers, and structures
Arrays can be of any basic data type
Pointers are used to store memory addresses
Structures are used to group related data of different data types
Object-oriented programming concepts that help in organizing and structuring code.
Encapsulation: Bundling data and methods together in a class.
Inheritance: Creating new classes from existing ones, inheriting their properties and behaviors.
Polymorphism: Ability of objects to take on many forms, allowing methods to be overridden.
Abstraction: Hiding complex implementation details and providing simplified interfaces.
Encaps...
Data structures are a way of organizing and storing data in a computer so that it can be accessed and manipulated efficiently.
Data structures are used to store and organize data in a computer.
They provide a way to efficiently access and manipulate the stored data.
Examples of data structures include arrays, linked lists, stacks, queues, trees, and graphs.
External CSS and JS files can be linked to HTML using the <link> and <script> tags respectively.
Use the <link> tag with the 'rel' attribute set to 'stylesheet' to link external CSS files.
Use the <script> tag with the 'src' attribute to link external JS files.
Place the <link> and <script> tags within the <head> section of the HTML document.
CSS is used to style and format HTML web pages, making them visually appealing and user-friendly.
CSS allows for separation of content from design, making it easier to update and maintain websites.
It enables customization of fonts, colors, layouts, and other visual elements on a webpage.
CSS helps in creating responsive web designs that adapt to different screen sizes and devices.
It provides the ability to create animati...
The Observer design pattern defines a one-to-many dependency between objects, so that when one object changes state, all its dependents are notified and updated automatically.
The Observer pattern is used to establish communication between objects in a loosely coupled manner.
It allows multiple observers (dependents) to be notified when the state of a subject (observable) changes.
The subject maintains a list of observers...
An algorithm is a step-by-step procedure or set of rules for solving a problem or accomplishing a task.
An algorithm is a well-defined computational procedure.
It consists of a sequence of instructions that are executed in a specific order.
Algorithms can be represented using pseudocode, flowcharts, or programming languages.
They are used in various fields like computer science, mathematics, and engineering.
Examples of alg...
I am very confident in Java programming.
I have completed multiple projects using Java.
I have experience with various Java frameworks such as Spring and Hibernate.
I am familiar with Java design patterns and best practices.
I have also contributed to open source Java projects.
I am constantly learning and improving my Java skills.
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 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 appeared for an interview in Dec 2020.
Round duration - 150 minutes
Round difficulty - Medium
Given a singly linked list of integers, determine if the linked list is a palindrome.
A linked list is considered a palindrome if it reads the same forwar...
Check if a given singly linked list of integers is a palindrome or not.
Traverse the linked list to find the middle element using slow and fast pointers.
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 given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Find pairs of elements in an array that sum up to a given value, sorted in a specific order.
Iterate through the array and for each element, check if the complement (S - current element) exists in a hash set.
If the complement exists, add the pair (current element, complement) to the result list.
Sort the result list based on the first element of each pair, and then based on the second element if the first elements are eq...
Round duration - 60 minutes
Round difficulty - Medium
You are provided with two integers, 'N' and 'D'. Your objective is to determine the square root of the number 'N' with a precision up to 'D' decimal pl...
Implement a function to find the square root of a number with a specified decimal precision.
Implement a function that takes two integers N and D as input and returns the square root of N with precision up to D decimal places.
Use mathematical algorithms like Newton's method to approximate the square root with the required precision.
Ensure that the difference between the computed result and the true square root is less t...
Tip 1 : Have more understanding and confidence over Data Structures and get good understanding of its concepts. At least practice 5-6 coding questions everyday on any coding platform. I had completed around 150+ questions on Leetcode and 250+ questions on Geek For Geeks. Practice regularly rather than completing all coding questions in one go.
Tip 2 : While attempting the questions analyze its time and space complexity. Always work on the strategies to further optimize your solution. Sometimes the interviewer asks only one question and keep on increasing its difficulty by asking for its optimization and will what kind of strategies you implement.
Tip 3 : Along with coding questions keep on studying concepts in details of Operating Systems, databases and object oriented programming. Refer to Geeks For Geeks articles for it. Also refer, Coding Ninja's Data Structures and algorithms course in C++ helped me a lot in improving my OOPS concepts specifically.
Tip 1 : Mention only those skills, projects or achievements which you have completed yourselves and thorough knowledge. Because there will be question around these and in case if you are not able to answer these basic questions it leaves a bad impact on interviewer.
Tip 2 : No need to add too many projects. Only one or two good projects with proper knowledge is fine. Also do the same for skills, do not add so many skills only add those one in which you can discuss and answer.
Tip 3 : Mention achievements which showcase your technical skills, communication skills, leadership quality or teamwork
I appeared for an interview in Sep 2020.
Round duration - 145 minutes
Round difficulty - Easy
The online assessment consisted of four components, a code debugging section (20 minutes), a coding test (70 minutes), a workstyles assessment (20 minutes) and a reasoning ability section (35 minutes). Code debugging questions were pretty simple and straightforward. The coding test consisted of 2 questions, first was similar to two Sum problem. Second question was similar to find the critical edges in a graph. The workstyles assessment section contained certain behavioural questions.
Reasoning ability section consisted of aptitude questions. This round was basically to check the problem solving skills of the candidate.
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 difference between the target and the element exists in a hash set.
If it exists, then print the pair (element, target-element), else add the element to the hash set.
If no pair is found, print (-1, -1).
In an undirected graph consisting of V
vertices and E
edges, your task is to identify all the bridges within the graph. A bridge is an edge which, when removed, result...
Identify bridges in an undirected graph by finding edges that, when removed, increase the number of connected components.
Use depth-first search (DFS) to find bridges in the graph.
Keep track of discovery time and low time for each vertex during DFS.
An edge (u, v) is a bridge if low[v] > disc[u].
Sort and print the bridge pairs in ascending order of vertices.
Example: If the input graph has vertices 0, 1, 2, 3, 4 and ed...
Round duration - 60 minutes
Round difficulty - Medium
I was asked two coding questions. First question was related to binary tree and second question was to implement LRU cache.
I had to code both questions. The interviewer asked me the time and space complexity for both the questions.
Given a circular array ARR
of size N
consisting of positive and negative integers, determine if there is a cycle present in the array. You can make movements based on...
Determine if a circular array has a cycle present, following specific movement rules.
Iterate through the array and check for cycles following the given movement rules.
Keep track of visited indices to detect cycles.
Handle both clockwise and counterclockwise movements separately.
Return 'True' if a cycle is found, 'False' otherwise.
Design and implement a Least Recently Used (LRU) cache data structure, which supports the following operations:
get(key)
- Return the value of the key if it exists in the cach...Implement a Least Recently Used (LRU) cache data structure with get and put operations.
Use a combination of a hashmap and a doubly linked list to efficiently implement the LRU cache.
Keep track of the least recently used item and update it accordingly when inserting new items.
Ensure to handle the capacity constraint by evicting the least recently used item when the cache is full.
For get operation, return the value of th...
Round duration - 60 minutes
Round difficulty - Medium
I was asked two coding questions and some conceptual questions about priority heap data structure. I was able to code the optimized approach for the first question. But second question was a little tricky for me as I had never heard it before. But I explained my approach confidently. The interviewer also helped me and finally I was able to code it.
Given 'N' ropes, each having different lengths, your task is to connect these ropes into one single rope. The cost to connect two particular ropes is equal to the sum of th...
Connect ropes with different lengths into one single rope with minimum cost by merging the smallest ropes first.
Sort the lengths of ropes in ascending order.
Merge the two smallest ropes at each step to minimize cost.
Keep track of the total cost as you merge the ropes.
Repeat the merging process until all ropes are connected.
Return the total cost as the minimum cost to connect all ropes.
Given a positive integer N
, you are required to generate a list of integers of size 2N
such that it contains all the integers from 1 to N
, both included, twice. These in...
Generate Langford pairing for given N, return 'Valid' if correct, 'Invalid' if not.
Generate a list of integers of size 2N with all integers from 1 to N twice.
Arrange integers according to Langford pairing rules.
Return 'Valid' if pairing is correct, 'Invalid' if not.
If no valid pairing possible, return list with only -1 element.
Tip 1 : Be very clear with the basics of each topic.
Tip 2 : Be thorough with the projects mentioned in the resume.
Tip 1 : Don't lie on your resume.
Tip 2 : The number of projects on the resume does not matter, what matters is that you must be thorough with your projects.
I appeared for an interview in Nov 2020.
Round duration - 120 Minutes
Round difficulty - Medium
Around 4-5 pm
2 coding questions
7 debugging and output questions
20-30 aptitude questions
A section to test psychology based on various questions and situations.
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...
You are provided with an array of integers ARR
of length N
. Your task is to determine the next smaller element for each array element.
The Next Smalle...
Given an array of integers, find the next smaller element for each element in the array.
Iterate through the array from right to left and use a stack to keep track of elements.
Pop elements from the stack until a smaller element is found or the stack is empty.
If no smaller element is found, output -1 for that element.
Round duration - 50 Minutes
Round difficulty - Medium
Timing - 4pm
Just asked one question based on DSA and asked to make the code modular and well indented.
Didn’t even ask for introduction.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find minimum time to rot all fresh oranges in a grid if adjacent to rotten oranges.
Use Breadth First Search (BFS) to simulate the rotting process of oranges.
Keep track of the time taken to rot all fresh oranges.
If at the end there are still fresh oranges left, return -1 as it is impossible to rot all oranges.
Round duration - 60 Minutes
Round difficulty - Medium
Started at 4pm
Interviewer introduced himself and then asked me for a brief introduction.
Went ahead to ask 2 DSA based questions.
You are provided with 'K' sorted linked lists, each sorted in increasing order. Your task is to merge all these lists into one single sorted linked list and return the head of ...
Merge k sorted linked lists into one single sorted linked list.
Create a min-heap to store the heads of all k linked lists.
Pop the smallest element from the heap and add it to the result list.
If the popped element has a next element, push it back into the heap.
Repeat until all elements are merged into a single sorted list.
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.
Recursively try moving in all directions (up, down, left, right) until reaching the destination.
Add the current direction to the path and backtrack if the path leads to a dead end.
Return all valid paths found in alphabetical order as an ar...
Tip 1 : Smart Preparation is very important instead of just preparing everything.
Tip 2 : Going through previous interview experiences helps a lot.
Tip 3 : Focussing on time and space complexities instead of just the logic.
Tip 4 : Be thorough with the projects mentioned in resume.
Tip 5 : Daily practice of as many questions as possible with at least a couple of questions with level:Hard
Tip 1 : Keep it technical and to the point with no catch phrases.
Tip 2 : Use of action verbs to highlight the work put in projects or any previous internships.
Tip 3 : Use of bullet points.
Tip 4 : Mention clickable links of your projects, github account and certificates whenever possible.
I appeared for an interview in Dec 2020.
Round duration - 60 minutes
Round difficulty - Medium
The interviewer was very friendly and introduced herself. She told me that she had two coding problems for this round.
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
The input consists of a single line containing elem...
Implement a function to return the spiral order traversal of a binary tree.
Traverse the binary tree in a spiral order, alternating between left to right and right to left.
Use a queue to keep track of nodes at each level and a flag to switch direction.
Handle null nodes appropriately to maintain the spiral order traversal.
Example: Input: 1 2 3 -1 -1 4 5, Output: 1 3 2 4 5
You are provided with a 2D matrix containing only the integers 0 or 1. The matrix has dimensions N x M, and each row is sorted in non-decreasing order. Your...
Find the row with the maximum number of 1's in a sorted 2D matrix.
Iterate through each row of the matrix and count the number of 1's in each row.
Keep track of the row index with the maximum number of 1's encountered so far.
Return the index of the row with the maximum number of 1's.
If multiple rows have the same number of 1's, return the row with the smallest index.
Round duration - 70 minutes
Round difficulty - Medium
This round was held 30 minutes after the 2nd round. There were two interviewers and both introduced themselves. Both of them were friendly and made me comfortable for the round.
You have an array of N positive integers. Your goal is to sort this array in descending order based on the number of set bits in the binary representation of each integer.
In ...
Sort array of positive integers based on set bit count in descending order.
Count set bits for each integer using bitwise operations.
Implement a custom comparator function to sort the array based on set bit count.
Handle cases where integers have the same set bit count by retaining their original order.
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
Find minimum time to rot all fresh oranges adjacent to rotten oranges in a grid.
Use Breadth First Search (BFS) to simulate the rotting process
Keep track of the time taken to rot all fresh oranges
Return -1 if not all fresh oranges can be rotten
Tip 1 : Learn all basic DSA with their time and space complexities first. Then move on to company-specific problems.
Tip 2 : Have some experience in competitive programming, as it helps you to arrive at solutions quickly.
Tip 3 : Have decent projects and mention them on your resume... Prepare for every possible question that can be asked from them.
Tip 1 : Be honest on your resume. Don't mention things which you are not comfortable with.
Tip 2 : Have at least two decent projects on your resume... Mentioning tech used in them is a plus.
I appeared for an interview in Nov 2020.
Round duration - 90 minutes
Round difficulty - Medium
Timing (6pm - 8pm)
Environment was user friendly
As usual the online round had two coding questions and 20 MCQs. This was a pretty easy round and it’s duration was 90 minutes. The round consisted of questions from various domains like Algorithm, Data Structure, Operating System and Aptitude.
A few days after appearing in this round, I was informed that I have been qualified for the next round.
Given an array composed of N elements, your task is to identify a subsequence with exactly three elements where these elements maintain a strictly increasin...
Identify a subsequence of size 3 with strictly increasing order in an array.
Iterate through the array and keep track of the smallest and second smallest elements encountered so far.
If a third element greater than both is found, return the subsequence.
Handle edge cases where no valid subsequence exists.
Given two arbitrary binary trees, your task is to determine whether these two trees are mirrors of each other.
Two trees are considered mirror of each other if...
Check if two binary trees are mirrors of each other based on specific criteria.
Compare the roots of both trees.
Check if the left subtree of the first tree is the mirror of the right subtree of the second tree.
Verify if the right subtree of the first tree is the mirror of the left subtree of the second tree.
Round duration - 90 minutes
Round difficulty - Medium
Timing (10 am- 11 am)
For this round I had slightly more time than the last, due to the fact that the weekend fell in between.The interviewer was very very cool and helping this time, something which I kept at the last in my list of probable things that can happen during an interview. Duration of this round was around 90 minutes.
This time I had to face three technical questions and one general question on Amazon.
Given a Binary Search Tree of integers, transform it into a Greater Sum Tree where each node's value is replaced with the sum of all node values gr...
Convert a Binary Search Tree to a Greater Sum Tree by replacing each node's value with the sum of all node values greater than the current node's value.
Traverse the BST in reverse inorder (right, root, left) to visit nodes in descending order.
Keep track of the running sum of visited nodes and update each node's value with this sum.
Modify the BST in place without creating a new tree.
Example: For input 11 2 29 1 7 15 40 ...
Help the Ultimate Ninja Ankush by determining how many groups of sizes 2 and 3 can be formed from a given list of integers such that the sum of each group is divisible by 3.
Count the number of groups of sizes 2 and 3 with sum divisible by 3 from a given list of integers.
Iterate through the array and check all possible combinations of 2 and 3 integers.
For each combination, check if the sum is divisible by 3.
Keep track of the valid groups and return the count at the end.
Tip 1 : Do atleast 3 major web dev project
Tip 2 : Practice from interview bit
Tip 1 : Resume should not be more than 1 page
Tip 2 : Be precise
I appeared for an interview before Sep 2020.
Round duration - 55 minutes
Round difficulty - Medium
It was a coding interview that started with introducing myself. Two questions from data structures were asked.
You are provided with a matrix containing 'N' rows and 'M' columns filled with integers. Each row is sorted in non-decreasing order. Your task is to find the overall median...
Find the overall median of a matrix with sorted rows.
Merge all elements of the matrix into a single sorted array
Calculate the median of the merged array
Handle odd number of elements by directly finding the middle element
You are provided with an integer X
and a non-decreasing sorted doubly linked list consisting of distinct nodes.
Your task is to find and return the count of ...
Count triplets in a sorted doubly linked list that sum up to a given value.
Iterate through the list and for each node, find pairs that sum up to X-nodeValue.
Use two pointers approach to find pairs efficiently.
Keep track of count of triplets found while iterating through the list.
Tip 1 : Learn to explain your logic well.
Tip 2 : Learn to dry run your code.
Tip 3 : Solve as many data structures questions as you can.
Tip 1 : They did not shortlist resume .
Tip 2 : They did send link to everyone satisfying eligibility criteria.
Some of the top questions asked at the Imaginnovate Software Developer Intern interview -
based on 2 interview experiences
Difficulty level
Duration
Software Engineer
49
salaries
| ₹2.2 L/yr - ₹12.1 L/yr |
Senior Software Engineer
28
salaries
| ₹6.3 L/yr - ₹20 L/yr |
Software Engineer2
24
salaries
| ₹5 L/yr - ₹9.4 L/yr |
Software Engineer Level 1
13
salaries
| ₹3.5 L/yr - ₹4.5 L/yr |
Software Engineer III
10
salaries
| ₹5 L/yr - ₹10 L/yr |
TCS
Accenture
Wipro
Cognizant