Filter interviews by
You are given an array 'PRICES' of 'N' integers, where 'PRICES[i]' represents the price of a certain stock on the i-th day. An integer 'K' is also provided...
Determine the maximum profit achievable with at most K transactions by buying and selling stocks.
Iterate through the array and keep track of the minimum price to buy and maximum profit for each transaction.
Use dynamic programming to store the maximum profit at each day with each possible number of transactions.
Consider edge cases such as when K is 0 or when the array is empty.
Example: For input N = 6, PRICES = [3,...
Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity withou...
Implement a stack with getMin operation in O(1) time complexity without using extra space.
Use two stacks - one to store the actual elements and another to store the minimum values encountered so far.
When pushing an element, check if it is smaller than the current minimum and if so, push it onto the minimum stack.
When popping an element, check if it is the current minimum and if so, pop from the minimum stack as we...
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the l...
Detect if a singly linked list forms a cycle by checking if a node's next points back to a previous node.
Use Floyd's Tortoise and Hare algorithm to detect a cycle in the linked list.
Initialize two pointers, slow and fast, and move them at different speeds through the list.
If there is a cycle, the two pointers will eventually meet at some node.
If one of the pointers reaches the end of the list (null), there is no c...
Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position.
...Calculate minimum steps for a Knight to reach target position on a chessboard.
Use BFS algorithm to find the shortest path from Knight's starting position to target position.
Consider all possible moves of the Knight on the chessboard.
Keep track of visited positions to avoid revisiting them.
Return the minimum number of moves required to reach the target position.
Given a binary tree of integers, your task is to output the right view of the tree.
The right view of a binary tree includes the nodes that are visible when the tree is observed ...
The task is to output the right view of a binary tree, which includes the nodes visible when observed from the right.
Perform a level order traversal of the binary tree.
For each level, add the rightmost node to the result list.
Print the result list as the right view of the binary tree.
Handle null nodes by skipping them during traversal.
Given an integer array ARR
of size N
, replace each element of this array with its corresponding rank.
The rank of an element is an integer between 1 and N
(inclusive) that r...
Replace elements in an array with their corresponding ranks based on given rules.
Iterate through the array and assign ranks based on the rules provided.
Handle equal elements by assigning them the same rank.
Return the modified array with elements replaced by their ranks.
Given a singly linked list of integers, the task is to remove the middle node from this list.
The first line of input includes an integer 'T' which...
Remove the middle node from a singly linked list of integers.
Identify the middle node using slow and fast pointers technique.
Update the pointers to remove the middle node.
Handle cases where there are two middle nodes by removing the first one.
Return NULL if no middle node exists.
Achieve O(N) time and O(1) space complexity with a single traversal.
Given a binary tree, your task is to print the left view of the tree.
The input will be in level order form, with node values separated by a ...
Print the left view of a binary tree given in level order form.
Traverse the tree level by level and print the first node of each level
Use a queue to keep track of nodes at each level
Consider null nodes as well while traversing the tree
You are provided with a continuous non-empty string (referred to as 'sentence') which contains no spaces and a dictionary comprising a list of non-empty strings (known as 'word...
Given a dictionary of words and a continuous string, generate all possible sentences by inserting spaces.
Use recursion to generate all possible combinations of words from the dictionary to form sentences.
Check if a substring of the sentence matches any word in the dictionary, if so, recursively call the function with the remaining substring.
Keep track of the current sentence being formed and add it to the result w...
Ram is in Ninjaland, visiting a unique candy store offering 'N' candies each with different costs. The store has a special offer: for every candy you purchase, you ca...
Determine the minimum and maximum amounts of money needed to purchase all candies with a special offer.
Iterate through the candy costs array to find the minimum and maximum costs.
Consider the special offer of getting up to 'K' additional candies for free.
Calculate the minimum cost by selecting the cheapest candies and taking free ones.
Calculate the maximum cost by selecting the most expensive candies and taking fr...
I applied via Job Portal and was interviewed in Mar 2024. There was 1 interview round.
I appeared for an interview in Apr 2021.
Round duration - 60 Minutes
Round difficulty - Medium
Timing- In the evening around 5 pm
Environment- It was online test so I was in my room comfortable.
You are given an array 'PRICES' of 'N' integers, where 'PRICES[i]' represents the price of a certain stock on the i-th day. An integer 'K' is also provide...
Determine the maximum profit achievable with at most K transactions by buying and selling stocks.
Iterate through the array and keep track of the minimum price to buy and maximum profit for each transaction.
Use dynamic programming to store the maximum profit at each day with each possible number of transactions.
Consider edge cases such as when K is 0 or when the array is empty.
Example: For input N = 6, PRICES = [3, 2, 6...
Round duration - 60 minutes
Round difficulty - Easy
Timing - 2pm
Environment - my room
Interviewer was pretty chilled.
Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity witho...
Implement a stack with getMin operation in O(1) time complexity without using extra space.
Use two stacks - one to store the actual elements and another to store the minimum values encountered so far.
When pushing an element, check if it is smaller than the current minimum and if so, push it onto the minimum stack.
When popping an element, check if it is the current minimum and if so, pop from the minimum stack as well.
Fo...
Tip 1 : Be well prepared in DSA , including graphs,dp
Tip 2 : practice regularly one or two hours is enough but u need to be consistent for atleast a year or so
Tip 3 : prepare os dbms oops in last week of the interview
Tip 1 : at least Two projects
Tip 2 : Some experience in competitive programming will be beneficial.
I appeared for an interview in Oct 2020.
Round duration - 65 minutes
Round difficulty - Medium
It was 24 hours window for the online round from 8 Oct 10:30 am to 9 Oct 10:30 am. There were 7 MCQ problems related to c++, java, DBMS, and operating systems. And 2 coding problems with one easy and one moderate level difficulty for question, we were supposed to write the whole program but for other question, the function was to be written only. I was able to solve the first problem fully and the second 50%, you are required to pass test cases.
Ram is in Ninjaland, visiting a unique candy store offering 'N' candies each with different costs. The store has a special offer: for every candy you purchase, you c...
Determine the minimum and maximum amounts of money needed to purchase all candies with a special offer.
Iterate through the candy costs array to find the minimum and maximum costs.
Consider the special offer of getting up to 'K' additional candies for free.
Calculate the minimum cost by selecting the cheapest candies and taking free ones.
Calculate the maximum cost by selecting the most expensive candies and taking free on...
You are provided with a continuous non-empty string (referred to as 'sentence') which contains no spaces and a dictionary comprising a list of non-empty strings (known as 'wor...
Given a dictionary of words and a continuous string, generate all possible sentences by inserting spaces.
Use recursion to generate all possible combinations of words from the dictionary to form sentences.
Check if a substring of the sentence matches any word in the dictionary, if so, recursively call the function with the remaining substring.
Keep track of the current sentence being formed and add it to the result when t...
Round duration - 90 minutes
Round difficulty - Medium
The interviewer asked me questions about projects, general discussion, and 3 coding questions based on linked list, arrays, and binary tree.
I gave optimum approach for every question.
Given a singly linked list of integers, the task is to remove the middle node from this list.
The first line of input includes an integer 'T' whic...
Remove the middle node from a singly linked list of integers.
Identify the middle node using slow and fast pointers technique.
Update the pointers to remove the middle node.
Handle cases where there are two middle nodes by removing the first one.
Return NULL if no middle node exists.
Achieve O(N) time and O(1) space complexity with a single traversal.
Given an integer array ARR
of size N
, replace each element of this array with its corresponding rank.
The rank of an element is an integer between 1 and N
(inclusive) that ...
Replace elements in an array with their corresponding ranks based on given rules.
Iterate through the array and assign ranks based on the rules provided.
Handle equal elements by assigning them the same rank.
Return the modified array with elements replaced by their ranks.
Given a binary tree, your task is to print the left view of the tree.
The input will be in level order form, with node values separated by a...
Print the left view of a binary tree given in level order form.
Traverse the tree level by level and print the first node of each level
Use a queue to keep track of nodes at each level
Consider null nodes as well while traversing the tree
Tip 1 : First Go through all the concepts of Data Structures and algorithms, I have taken Coding ninjas course c++ interview preparation.
Tip 2 : Try to solve all the problems by yourself then it will be meant for you, if you can't solve them after 30-45 minutes of time then see the solution of it, and for this, I used to consult TA and mentors on coding ninjas course.
Tip 3 : Have confidence in yourself, if you can't solve it initially, gradually you will be able to solve the problems. Hard work pays off.
Tip 4 : Note down the main information's about your project like what you have done in the project and what difficulties you have faced, it will be a great way to tackle questions about the project in the interview.
Tip 1 : Keep it simple and mention what you actually know and achieved.
Tip 2 : Mention your institute email-id if you have, it adds weight to the resume
Tip 3 : Use the "Built/created/made X using Y to achieve Z" format when writing about projects or work done.
I appeared for an interview in Oct 2020.
Round duration - 90 minutes
Round difficulty - Medium
A 24 hour window was given to us and we can attempt the test anytime in between. It included 2 coding questions. One was easy-medium level and the other one was hard. Along with this 7 debugging MCQ's were given, however they were easy.
Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position...
Calculate minimum steps for a Knight to reach target position on a chessboard.
Use BFS algorithm to find the shortest path from Knight's starting position to target position.
Consider all possible moves of the Knight on the chessboard.
Keep track of visited positions to avoid revisiting them.
Return the minimum number of moves required to reach the target position.
Ram is in Ninjaland, visiting a unique candy store offering 'N' candies each with different costs. The store has a special offer: for every candy you purchase, you c...
Determine the minimum and maximum amount of money needed to purchase all candies with a special offer.
Iterate through the candy costs array to find the minimum and maximum costs.
Consider the special offer to calculate the minimum and maximum costs.
Keep track of the total cost and free candies obtained during the process.
Return the minimum and maximum costs for each test case.
Round duration - 50 minutes
Round difficulty - Easy
The interview was conducted around 11am in the morning. The interviewer was professional and to the point while questioning. However he gave me hints whenever I got stuck anywhere.
Given a binary tree of integers, your task is to output the right view of the tree.
The right view of a binary tree includes the nodes that are visible when the tree is observed...
The task is to output the right view of a binary tree, which includes the nodes visible when observed from the right.
Perform a level order traversal of the binary tree.
For each level, add the rightmost node to the result list.
Print the result list as the right view of the binary tree.
Handle null nodes by skipping them during traversal.
Determine if a given singly linked list of integers forms a cycle or not.
A cycle in a linked list occurs when a node's next
points back to a previous node in the ...
Detect if a singly linked list forms a cycle by checking if a node's next points back to a previous node.
Use Floyd's Tortoise and Hare algorithm to detect a cycle in the linked list.
Initialize two pointers, slow and fast, and move them at different speeds through the list.
If there is a cycle, the two pointers will eventually meet at some node.
If one of the pointers reaches the end of the list (null), there is no cycle.
Tip 1 : Your basics should be very clear about data structures and algorithms.
Tip 2 : Try to solve questions in a specific time frame. Also dry run your code with custom test cases, try to find the edge cases.
Apart from this try analyzing the time and space complexity of your solution.
Tip 3 : Take a look at editorials after solving the questions as it can give you a better approach to the problem.
Tip 4 : Don't neglect subjects like OOP's, DBMS and OS. Interviews ask few questions from here as well.
Tip 1 : Do not fake any skills, projects or achievements. The interviewer gets to know about it by asking questions to you.
Tip 2 : Have at-least one good project on resume with all the details like technologies used and purpose.
Tip 3 : Don't write achievements which doesn't relate to your role. Write achievements which shows communication skills, leadership or teamwork.
Top trending discussions
I appeared for an interview before May 2021.
Round duration - 90 Minutes
Round difficulty - Medium
Yes, I can analyze SQL queries and code snippets to determine correct outputs or errors.
Understand the SQL syntax and logic to identify errors in queries.
Check for syntax errors, missing or incorrect keywords, and data type mismatches.
Analyze the code snippets to identify logical errors or potential bugs.
Compare the expected output with the provided output to determine correctness.
Round duration - 15 minutes
Round difficulty - Medium
Joins are used to combine rows from two or more tables based on a related column, while indexing is a technique to improve the performance of queries by creating a data structure that allows for quick lookup of data.
Joins are used to retrieve data from multiple tables based on a related column, such as INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Indexing involves creating data structures like B-trees or hash table...
Round duration - 20 Minutes
Round difficulty - Medium
Tip 1 : Be well versed with the concepts of Data Structures and SQL
Tip 2 : Should have thorough knowledge of your projects
Tip 1 : Mention your projects very clearly
Tip 2 : You should be able to justify everything on your resume from grades to skills
I appeared for an interview before Jun 2021.
Round duration - 90 Minutes
Round difficulty - Medium
Round duration - 60 Minutes
Round difficulty - Medium
Your task is to determine if a given binary tree with 'N' nodes is a valid Binary Search Tree (BST). A BST is defined by the following properties:
Validate if a given binary tree is a valid Binary Search Tree (BST) based on its properties.
Check if the left subtree of a node has only nodes with data less than the node's data.
Verify if the right subtree of a node has only nodes with data greater than the node's data.
Ensure that both the left and right subtrees are also binary search trees.
Implement a validation function for a BST.
Output 'true' if the binary tree is...
Round duration - 60 Minutes
Round difficulty - Easy
Tip 1 : Pratice regularly atleast 5 problem . Make it habit .Try to cover Leetcode medium questions as many as possible
Tip 2 : Be through with your projects . At some point interviewer will ask you some project related questions
Tip 3 : Be strong in your CS fundamentals.
Tip 1 : Do not put irrelevant information such as DOB
Tip 2 : Put only those skill which you can defend in cross questioning
posted on 15 Aug 2024
Aptitude test on engineering subjects
Writing projects in c
I applied via Campus Placement and was interviewed in Aug 2024. There were 2 interview rounds.
Aptitude test with different sections. Each section had its own time limit. Level - Moderate to difficult
I am a passionate software developer with experience in Java, Python, and web development.
Experienced in Java and Python programming languages
Proficient in web development technologies like HTML, CSS, and JavaScript
Currently pursuing a degree in Computer Science
I appeared for an interview in Jan 2022.
Round duration - 100 Minutes
Round difficulty - Hard
There were 2 interviewers. It started with an introduction from me and one of the interviewers directly started with a DSA questions. Two problems were asked and I had to code them on a compiler of my choice by sharing my screen. Level of DSA question was medium but I was severely grilled on oops. I had to create different abstract classes, interface and explain entire oops with examples.
This was followed by a set of core JAVA questions :
Difference between == and .equals() ?
Mention some methods of the object class?
Difference between TreeSet and SortedSet?
How is a String saved in JAVA?
difference between string pool and heap memory?
Your task is to determine the shortest distance between two nodes with given keys in a Binary Search Tree (BST).
It is assured that both keys exist within the BS...
Find the shortest distance between two nodes in a Binary Search Tree.
Traverse the BST to find the paths from the root to both nodes.
Compare the paths to find the common ancestor node.
Calculate the distance by adding the lengths of the paths from the common ancestor to both nodes.
Return the shortest distance as the result.
You are tasked with finding the greatest common divisor (GCD) of two given numbers 'X' and 'Y'. The GCD is defined as the largest integer that divides both of the...
Find the greatest common divisor (GCD) of two given numbers 'X' and 'Y'.
Iterate from 1 to the minimum of X and Y, check if both X and Y are divisible by the current number, update GCD if true
Use Euclidean algorithm to find GCD: GCD(X, Y) = GCD(Y, X % Y)
If one of the numbers is 0, the other number is the GCD
Handle edge cases like when one of the numbers is 0 or negative
Given an undirected graph with V vertices and E edges, your task is to find all the bridges in this graph. A bridge is an edge that, when removed, increases the number of...
Find all the bridges in an undirected graph.
Use Tarjan's algorithm to find bridges in the graph.
A bridge is an edge whose removal increases the number of connected components.
Check for bridges by removing each edge and running a DFS to see if the graph is still connected.
Tip 1 : Tree is the most important topic in BlackRock recruitment process.
Tip 2 : have atleast one live working project- host your project either on Heroku/Play Store.
Tip 3 : Practice atleast 100 leetcode medium questions.
Tip 1 : Don't oversell yourself because interviewers will grind you on everything that you write in resume.
Tip 2 : Mention links to your project.
based on 1 interview experience
Difficulty level
Duration
based on 1 review
Rating in categories
Senior Executive
88
salaries
| ₹3 L/yr - ₹5 L/yr |
Software Developer
84
salaries
| ₹20 L/yr - ₹36 L/yr |
Assistant Manager
71
salaries
| ₹5.8 L/yr - ₹22 L/yr |
Customer Support Executive
54
salaries
| ₹2.5 L/yr - ₹4.2 L/yr |
Software Engineer
47
salaries
| ₹11 L/yr - ₹42 L/yr |
Zerodha
Sharekhan
SBI Cards & Payment Services
Axis Direct