Filter interviews by
Convert a given infix expression, represented as a string EXP
, into its equivalent postfix expression.
An infix expression is formatted as a op b
where the operat...
Convert infix expression to postfix expression.
Use a stack to keep track of operators and operands.
Follow the rules of precedence for operators.
Handle parentheses to ensure correct order of operations.
Given an n x n
matrix mat[n][n]
of integers, find the maximum value of mat[c][d] - mat[a][b]
for all possible indices where c > a
and d > b
.
The first line conta...
Find the maximum difference between elements in a matrix with specific conditions.
Iterate through all possible pairs of indices (a, b) and (c, d) where c > a and d > b.
Calculate the difference between mat[c][d] and mat[a][b] for each pair.
Keep track of the maximum difference found so far.
Return the maximum difference as the final result.
You are provided with an N * M
sized binary matrix 'MAT' where 'N' denotes the number of rows and 'M' denotes the number of columns. Your ta...
Find the maximum area of a submatrix with all 1's in a binary matrix.
Iterate over each cell in the matrix and calculate the maximum area of submatrix with that cell as the top-left corner.
Use dynamic programming to keep track of the maximum width of 1's ending at each cell.
Update the maximum area as you iterate through the matrix.
Return the maximum area found.
Determine the maximum path sum for any path in a given binary tree with 'N' nodes.
Note:
Find the maximum path sum in a binary tree with 'N' nodes.
Traverse the binary tree to find the maximum path sum.
Keep track of the maximum sum encountered so far.
Consider all possible paths in the tree to find the maximum sum.
Example: For input 1 2 3 4 -1 5 6 -1 -1 -1 -1 -1 -1, the maximum path sum is 16.
Your task is to determine the maximum possible sum of a simple path between any two nodes (possibly the same) in a given binary tree of 'N' nodes with integer values.
Find the maximum sum of a simple path between any two nodes in a binary tree.
Use a recursive approach to traverse the binary tree and calculate the maximum sum path.
Keep track of the maximum sum path found so far while traversing the tree.
Consider negative values in the path sum calculation to handle cases where the path can skip nodes.
Update the maximum sum path if a new path with a higher sum is found.
Given an N x M binary matrix 'MAT', where N is the number of rows and M is the number of columns, determine the maximum area of a submatrix consisting entirel...
Find the maximum area of a submatrix consisting entirely of 1's in a binary matrix.
Iterate over each cell in the matrix and calculate the maximum area of a submatrix with that cell as the top-left corner.
Use dynamic programming to keep track of the maximum width of 1's ending at each cell in the current row.
Update the maximum area as you iterate through the matrix and consider each cell as the bottom-right corner ...
Transform a string representing a valid Prefix expression, which may contain operators '+', '-', '*', '/', and uppercase letters, into its corresponding Infix expression.
Convert a valid Prefix expression to its corresponding Infix expression.
Use a stack to store operands and operators while traversing the prefix expression from right to left.
Pop operands from the stack and form the infix expression by placing them between corresponding operators.
Handle the precedence of operators to ensure correct order of operations in the infix expression.
Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.
T (number of test cases)
For each test case:
N (size...
The minimum number of swaps required to sort a given array of distinct elements in ascending order.
Use a graph-based approach to find cycles in the array for swapping
Count the number of swaps needed to sort the array
Example: For [4, 3, 2, 1], 2 swaps are needed to sort it to [1, 2, 3, 4]
I appeared for an interview in Feb 2021.
Round duration - 90 minutes
Round difficulty - Medium
Timing was 10AM. The platform was quite good.
You are provided with an N * M
sized binary matrix 'MAT' where 'N' denotes the number of rows and 'M' denotes the number of columns. Your t...
Find the maximum area of a submatrix with all 1's in a binary matrix.
Iterate over each cell in the matrix and calculate the maximum area of submatrix with that cell as the top-left corner.
Use dynamic programming to keep track of the maximum width of 1's ending at each cell.
Update the maximum area as you iterate through the matrix.
Return the maximum area found.
Determine the maximum path sum for any path in a given binary tree with 'N' nodes.
Note:
Find the maximum path sum in a binary tree with 'N' nodes.
Traverse the binary tree to find all possible paths and calculate their sums.
Keep track of the maximum sum encountered during traversal.
Consider both left and right child nodes while calculating the path sum.
Handle null nodes represented by '-1' in the input.
Return the maximum path sum for each test case.
Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.
T (number of test cases)
For each test case:
N (siz...
The minimum number of swaps required to sort a given array of distinct elements in ascending order.
Use graph theory to solve the problem by counting cycles in the permutation.
The number of swaps needed is equal to the number of cycles in the permutation minus one.
Consider using a hashmap to keep track of visited elements to optimize the solution.
Example: For input array [4, 3, 2, 1], the minimum number of swaps require...
Convert a given infix expression, represented as a string EXP
, into its equivalent postfix expression.
An infix expression is formatted as a op b
where the opera...
Convert infix expression to postfix expression.
Use a stack to keep track of operators and operands.
Follow the rules of precedence for operators.
Handle parentheses to ensure correct order of operations.
Tip 1 : Do at least 1 project.
Tip 2 : Practice data structure questions.
Tip 3 : Dynamic programming is must.
Tip 1 : Do not put false things.
Tip 2 : Keep it short and direct.
I appeared for an interview in Feb 2021.
Round duration - 90 minutes
Round difficulty - Medium
Timing was 10AM. The platform was quite good.
Given an N x M binary matrix 'MAT', where N is the number of rows and M is the number of columns, determine the maximum area of a submatrix consisting entire...
Find the maximum area of a submatrix consisting entirely of 1's in a binary matrix.
Iterate over each cell in the matrix and calculate the maximum area of a submatrix with that cell as the top-left corner.
Use dynamic programming to keep track of the maximum width of 1's ending at each cell in the current row.
Update the maximum area as you iterate through the matrix and consider each cell as the bottom-right corner of th...
Your task is to determine the maximum possible sum of a simple path between any two nodes (possibly the same) in a given binary tree of 'N' nodes with integer values.
Find the maximum sum of a simple path between any two nodes in a binary tree.
Use a recursive approach to traverse the binary tree and calculate the maximum sum path.
Keep track of the maximum sum path found so far while traversing the tree.
Consider negative values in the path sum calculation to handle cases where the path can skip nodes.
Update the maximum sum path if a new path with a higher sum is found.
Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.
T (number of test cases)
For each test case:
N (siz...
The minimum number of swaps required to sort a given array of distinct elements in ascending order.
Use a graph-based approach to find cycles in the array for swapping
Count the number of swaps needed to sort the array
Example: For [4, 3, 2, 1], 2 swaps are needed to sort it to [1, 2, 3, 4]
Transform a string representing a valid Prefix expression, which may contain operators '+', '-', '*', '/', and uppercase letters, into its corresponding Infix expression.
Convert a valid Prefix expression to its corresponding Infix expression.
Use a stack to store operands and operators while traversing the prefix expression from right to left.
Pop operands from the stack and form the infix expression by placing them between corresponding operators.
Handle the precedence of operators to ensure correct order of operations in the infix expression.
Tip 1 : Do at least 1 project.
Tip 2 : Practice data structure questions.
Tip 3 : Dynamic programming is must.
Tip 1 : Do not put false things.
Tip 2 : Keep it short and direct.
I appeared for an interview in Feb 2021.
Round duration - 90 minutes
Round difficulty - Medium
Timing was 10AM. The platform was user-friendly.
You are provided with an N * M
sized binary matrix 'MAT' where 'N' denotes the number of rows and 'M' denotes the number of columns. Your t...
Find the maximum area of a submatrix with all 1's in a binary matrix.
Iterate over each cell in the matrix and calculate the maximum area of submatrix with that cell as the top-left corner.
Use dynamic programming to keep track of the maximum width of 1's ending at each cell.
Update the maximum area as you iterate through the matrix.
Return the maximum area found.
Determine the maximum path sum for any path in a given binary tree with 'N' nodes.
Note:
Find the maximum path sum in a binary tree with 'N' nodes.
Traverse the binary tree to find the maximum path sum.
Keep track of the maximum sum encountered so far.
Consider all possible paths in the tree to find the maximum sum.
Example: For input 1 2 3 4 -1 5 6 -1 -1 -1 -1 -1 -1, the maximum path sum is 16.
Find the minimum number of swaps required to sort a given array of distinct elements in ascending order.
T (number of test cases)
For each test case:
N (siz...
Find the minimum number of swaps required to sort an array of distinct elements in ascending order.
Use graph theory to solve the problem by considering each element as a node and edges representing the swaps needed to sort the array
Implement a graph-based approach like cycle detection to find the minimum number of swaps required
Consider using an efficient sorting algorithm like bubble sort or selection sort to minimize...
Transform a string representing a valid Prefix expression, which may contain operators '+', '-', '*', '/', and uppercase letters, into its corresponding Infix expression.
Convert a valid Prefix expression to its corresponding Infix expression.
Use a stack to store operands and operators while traversing the prefix expression from right to left.
Pop operands from the stack and form the infix expression by placing them between corresponding operators.
Handle the precedence of operators to ensure correct order of operations.
Ensure to handle parentheses to maintain the correct evaluation order...
Tip 1 : Atleast 1 project
Tip 2 : Practice data structures
Tip 1 : Keep it short
Tip 2 : Don't put false information
I appeared for an interview in Jan 2021.
Round duration - 60 Minutes
Round difficulty - Easy
Given an n x n
matrix mat[n][n]
of integers, find the maximum value of mat[c][d] - mat[a][b]
for all possible indices where c > a
and d > b
.
The first line cont...
Find the maximum difference between elements in a matrix with specific conditions.
Iterate through all possible pairs of indices (a, b) and (c, d) where c > a and d > b.
Calculate the difference between mat[c][d] and mat[a][b] for each pair.
Keep track of the maximum difference found so far.
Return the maximum difference as the final result.
Round duration - 20 Minutes
Round difficulty - Easy
Tip 1 : Try solving Love Babbar 450 Prog questions
Tip 2 : Have a good resume
Tip 3 : Do learn some extra technologies eg. ML/AI
Tip 1 : Do not lie at all
Tip 2 : Have some projects listed
Top trending discussions
I applied via Campus Placement and was interviewed before Jul 2023. There were 4 interview rounds.
45 questions time - 30min
2 Medium Leetcode questions
Use a big integer library to calculate factorial of large numbers like 100.
Use a big integer library like BigInteger in Java or BigInt in Python.
Implement a function to calculate factorial recursively or iteratively.
Handle large numbers by storing them in arrays or strings.
It was a great round with medium - hard level leetcode questions from graph and binary search.
I applied via Job Portal and was interviewed in Apr 2024. There were 3 interview rounds.
Contained aptitude questions followed by two coding questions.
Contained Two coding questions
Contained project to find bugs
posted on 5 Apr 2024
1. Coin change
2. Valid Parenthesis
3. Bipartite graph question
The question involves finding duplicates in an array, validating parentheses, generating random IDs, and determining the maximum number of random IDs that can be generated.
To find duplicates in an array, you can use a hash set to store unique elements and check for duplicates as you iterate through the array.
To validate parentheses, you can use a stack data structure to keep track of opening and closing parentheses.
To ...
Graph, DP questions of hard level
I applied via Campus Placement and was interviewed in Aug 2024. There were 2 interview rounds.
Included questions on mathematical reasoning, OS, DBMS and two coding questions
RAM is volatile memory for temporary storage, HDD is non-volatile storage for long-term data, and SSD is a faster non-volatile storage.
RAM is volatile memory that stores data temporarily while the computer is on.
HDD is a non-volatile storage device that uses spinning disks to store data long-term.
SSD is a faster non-volatile storage device that uses flash memory for quicker access to data.
RAM is faster but more expensi...
Maximize product collection in a grid by moving right or down from top left to bottom right.
Use dynamic programming to store maximum products collected at each cell.
Initialize a 2D array 'dp' where dp[i][j] represents max products at cell (i, j).
Base case: dp[0][0] = grid[0][0].
For each cell, calculate dp[i][j] = grid[i][j] + max(dp[i-1][j], dp[i][j-1]).
Return dp[m-1][n-1] where m and n are grid dimensions.
Senior Product Analyst
20
salaries
| ₹29 L/yr - ₹36 L/yr |
Senior Software Engineer 2
14
salaries
| ₹55 L/yr - ₹85 L/yr |
Associate Manager Marketing
11
salaries
| ₹13.5 L/yr - ₹15 L/yr |
Senior Software Engineer
11
salaries
| ₹33.3 L/yr - ₹62 L/yr |
Product Manager
11
salaries
| ₹23.2 L/yr - ₹40 L/yr |
JoulestoWatts Business Solutions
DotPe
Thoughtsol Infotech
11:11 Systems