Filter interviews by
Given a list aptitude questions
Given some java questions
I applied via Referral and was interviewed in Jan 2023. There were 2 interview rounds.
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 - Medium
25 mcqs and 2 coding questions
(It was a part of Amazewow process via Amazewit https://www.amazewit.in/)
Timing- any time between 22-24 may 2020
Webcam was on.
Given an array/list of integers ARR
consisting of N
integers, your task is to determine the length of the longest decreasing subsequence.
A ...
Find the length of the longest decreasing subsequence in an array of integers.
Use dynamic programming to keep track of the longest decreasing subsequence ending at each index.
Initialize an array to store the length of the longest decreasing subsequence ending at each index.
Iterate through the array and update the length of the longest decreasing subsequence for each element.
Return the maximum value in the array as the
Given an array arr
of length N, your task is to compute the Next Greater Element (NGE) for each element in the array. The NGE for an element X
is the first greater e...
The task is to find the Next Greater Element (NGE) for each element in an array.
Iterate through the array from right to left and use a stack to keep track of elements.
For each element, pop elements from the stack until finding a greater element.
Store the next greater element in a result array, if no greater element is found, store -1.
Time complexity can be optimized to O(N) using a stack.
Example: For input array [1, 3,
Round duration - 60 minutes
Round difficulty - Medium
It held at morning 10 AM.
The interviewer was very friendly.
I was asked to solve 2 coding questions and was continuously provided with hints by the interviewer.
Question was on Array and Trees.
Given a Binary Search Tree (BST) of integers, the task is to convert it into a greater sum tree. In this transformation, each node's value is replaced by the sum of value...
Convert a Binary Search Tree into a Greater Sum Tree by replacing each node's value with the sum of values of all nodes greater than the current node.
Traverse the BST in reverse inorder (right, root, left) to visit nodes in descending order.
Keep track of the sum of visited nodes and update each node's value with this sum.
Recursively apply the above steps to all nodes in the BST.
Example: For the given BST, the transform...
Round duration - 45 minutes
Round difficulty - Hard
Morning 8 AM.
The interviewer was very friendly provided with various hints.
It was covering complex coding questions on Tree Data Structures.
You are given a binary tree consisting of 'N' unique nodes and a start node where the burning will commence. The task is to calculate the time in minutes required to completely b...
Calculate the time in minutes required to completely burn a binary tree starting from a given node.
Perform a depth-first search (DFS) to calculate the time taken to burn the entire tree.
Track the time taken for each node to catch fire and propagate the fire to its adjacent nodes.
Return the maximum time taken among all nodes as the total time to burn the entire tree.
Given a binary tree and the values of two nodes, your task is to find the distance between these nodes within the Binary Tree.
Distance is defined as the minim...
Find the distance between two nodes in a binary tree.
Traverse the binary tree to find the paths from the root to each node.
Find the lowest common ancestor of the two nodes.
Calculate the distance by adding the distances from the nodes to the common ancestor.
Tip 1: Code More
Tip 2: Study Data Structures
Tip 3: Be Confident
Tip 1: Mention only what you are confident about
Tip 2: Mention tools & technologies used in the project as well
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
It contains 20 MCQs, based on the output of the given code and next followed by 2 programming questions. To get qualified for the next round you need to solve the 2 programming questions completely. The next rounds will be interviews. They had given 3 days time to attempt the first round.
Given an N*M matrix filled with integer numbers, determine the maximum sum that can be obtained from a path starting from any cell in the first row to any cell in the last row...
Find the maximum sum path in a matrix from top row to bottom row by moving down or diagonally.
Use dynamic programming to keep track of maximum sum at each cell.
At each cell, the maximum sum is the current cell value plus the maximum of the three possible previous cells.
Iterate through the matrix row by row and update the maximum sum at each cell.
Return the maximum sum found in the last row as the result.
You are given D
dice, each having F
faces numbered from 1 to F
. The task is to determine the number of possible ways to roll all the dice such that the sum of the face-up num...
The task is to determine the number of possible ways to roll all the dice such that the sum of the face-up numbers equals the given 'target' sum.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the number of ways to reach each sum with each dice.
Iterate through the dice and sum values to fill up the array.
Return the result modulo 10^9 + 7.
Optimize the solution to use no more than O(S)
Round duration - 50 minutes
Round difficulty - Hard
Determine if a permutation of a given string S
can form a palindrome.
string S = "aab"
"True"
The permutation "aba" o...
Check if a permutation of a string can form a palindrome.
Create a frequency map of characters in the string.
Count the number of characters with odd frequencies.
If there is at most one character with an odd frequency, the string can form a palindrome.
Given two strings STR1
and STR2
, determine the length of their longest common subsequence.
A subsequence is a sequence that can be derived from another sequen...
The problem involves finding the length of the longest common subsequence between two given strings.
Implement a function to find the longest common subsequence length between two strings.
Use dynamic programming to solve the problem efficiently.
Iterate through the strings and build a matrix to store the lengths of common subsequences.
Return the value in the bottom-right cell of the matrix as the result.
Tip 1 : Be thorough with Algorithm and Data Structures concepts.
Tip 2 : Try solving programming questions, mainly focus on the constraints before start writing the code.
Tip 3 : Try to find out an optimal solution.
Tip 1 : Include the projects you have done.
Tip 2 : Only include the programming languages, technologies you are thorough with.
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 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 - 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 - 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
Some of the top questions asked at the Imaginnovate Software Developer Intern interview -
based on 2 interviews
Interview experience
Software Engineer
43
salaries
| ₹2.2 L/yr - ₹11.6 L/yr |
Senior Software Engineer
22
salaries
| ₹6.3 L/yr - ₹16.2 L/yr |
Software Engineer2
20
salaries
| ₹5 L/yr - ₹8 L/yr |
Software Engineer Level 1
11
salaries
| ₹3.5 L/yr - ₹4.5 L/yr |
Software Engineer III
8
salaries
| ₹5 L/yr - ₹10 L/yr |
TCS
Accenture
Wipro
Cognizant