Filter interviews by
I applied via Referral and was interviewed in Jun 2023. There were 3 interview rounds.
3 questions of medium to hard coding questions.
I was interviewed in Nov 2020.
Round duration - 100 minutes
Round difficulty - Medium
Test started at 04:00 PM sharp and complete the same by 06:00 PM.
The test duration is 100 minutes.
Environment (Amcat) is user friendly and understandable.
Web cam and microphone were also enabled.
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 an integer array 'ARR' of size 'N' containing numbers from 0 to (N - 2). Each number appears at least once, and there is one number that appears twice. Yo...
Find the duplicate number in an integer array containing numbers from 0 to (N - 2).
Iterate through the array and keep track of the frequency of each number using a hashmap.
Return the number that appears twice in the array.
The duplicate number is always present in the given array.
Round duration - 40 minutes
Round difficulty - Hard
This round was conducted on skype platform. I was shared the invitation link one day prior to the interview and also was told the name of my interviewer. I looked at the profile of the interviewer at linked.in and got a better understanding of what kind of person he was and prepared accordingly. The round was scheduled at 3 :00 pm on 5th Nov and I was eagerly waiting for the clock hands to reach 3 o'clock since morning and finally I went in front of him after wearing a white shirt and a black coat over it along with a tie over it.
Ninja has a binary string S
of size N
given by his friend. The task is to determine if it's possible to sort the binary string S
in decreasing order by removing a...
Determine if a binary string can be sorted in decreasing order by removing non-adjacent characters.
Iterate through the binary string and check if it can be sorted in decreasing order by removing non-adjacent characters.
Keep track of the count of '1's and '0's in the string to determine if it can be sorted in decreasing order.
If the count of '1's is greater than the count of '0's, the string can be sorted in decreasing
You are given a string str
consisting of N
lowercase alphabets. Your task is to determine if it is possible to divide the string into three non-empty substrings such tha...
Given a string, determine if it can be split into three non-empty substrings where one is a substring of the other two.
Check if any substring of the string is a substring of the other two substrings.
Iterate through all possible splits of the string and check for the condition.
Use two pointers to find all possible substrings efficiently.
Round duration - 40 minutes
Round difficulty - Easy
This round was scheduled on 15th Nov, almost after 10 days of the previous technical round. I got the confirmation of passing the previous round on 11th Nov and was asked to appear in this final round which was scheduled on 15th Nov at 11:00 am in the morning and it was going to be an HR round which probably was my favourite among all the other rounds. I prepared for by reading interview experiences available at coding ninjas and geeksforgeeks.
Tip 1 : practice on gfg and coding ninjas
Tip 2 : compete on codechef and codeforces
Tip 3 : learn DSA and practice regularly
Tip 1 : Not more than 1 page
Tip 2 : Have atleast 3 projects with some achievement in coding contest and your coding handle should be mentioned like codechef, codeforces etc
Tip 3 : Try to keep only those things in resume in which you find yourself comfortable with
I was interviewed in Nov 2020.
Round duration - 90 Minutes
Round difficulty - Hard
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make...
Implement a function to determine the total number of ways to make change for a specified value using given denominations.
Use dynamic programming to keep track of the number of ways to make change for each value up to the target value.
Iterate through each denomination and update the number of ways to make change for each value based on the current denomination.
Return the total number of ways to make change for the targ...
Round duration - 90 Miinutes
Round difficulty - Medium
I was asked 3 coding questions
Designing a system like Facebook involves creating user profiles, news feeds, friend connections, messaging features, and more.
Create user profiles with personal information, photos, and posts
Implement a news feed algorithm to display relevant content to users
Allow users to connect with friends and follow other users
Include messaging features for private communication between users
Implement notifications for likes, com...
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 singly linked list into a Balanced Binary Search Tree (BST) using the same data values.
Create a function to convert the linked list to a BST by finding the middle element as the root and recursively building the left and right subtrees.
Maintain a pointer to the head of the linked list and update it as nodes are processed.
Use level order traversal to output the values of the BST nodes, representing NULL...
Round duration - 60 Minutes
Round difficulty - Easy
This is HR + Technical Round
Started with tell me about yourself asked about projects in depth
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 pointer points back to a previous node.
Use Floyd's Cycle Detection Algorithm to determine if there is a cycle in the linked list.
Maintain two pointers, one moving at twice the speed of the other.
If the two pointers meet at any point, there is a cycle in the linked list.
Tip 1 : Be good with aptitube skills
Tip 2 : Good with data structures and algorithms
Tip 3 : Be confident while explaining
Tip 1 : Good Projects
Tip 2 : Achievement is good to have
What people are saying about Morgan Stanley
I applied via Campus Placement
ATM transaction involves multiple background processes including authentication, authorization, and communication with bank servers.
Customer inserts card and enters PIN
ATM authenticates the card and PIN
ATM requests authorization from bank server
Bank server verifies account balance and approves or denies transaction
ATM dispenses cash or completes other requested transaction
ATM updates account balance and sends transacti
Cut cake into 8 pieces using knife 3 times only.
First, cut the cake horizontally into two equal halves.
Then, cut the cake vertically into four equal pieces.
Finally, cut the cake horizontally again into eight equal pieces.
Make sure to use the knife efficiently to minimize the number of cuts.
Practice visualization before making the cuts to avoid mistakes.
The one bird was already dead.
The bird was already dead before the shot was fired.
The bird was injured and unable to fly away with the rest of the birds.
The bird was a decoy bird used for hunting purposes.
The bird was a trained bird used for falconry.
Developed a web-based attendance management system and a mobile app for event management.
Created a database schema and implemented CRUD operations using PHP and MySQL.
Designed the user interface using HTML, CSS, and JavaScript.
Integrated Google Maps API for location tracking in the mobile app.
Implemented push notifications using Firebase Cloud Messaging.
Collaborated with a team of four to complete the projects within t
I applied via Campus Placement
Finding smallest of 4 numbers without using >.< and min function in Java.
Initialize a variable with the first number
Compare it with the remaining numbers using if-else statements
If a smaller number is found, update the variable
Repeat until all numbers are compared
The final value of the variable will be the smallest number
Code for palindrome checking
Convert the input to lowercase to ignore case sensitivity
Use two pointers, one at the start and one at the end of the string
Compare the characters at both pointers and move them towards each other
If all characters match, it's a palindrome
Javascript code to display 'Hello World!' on the webpage
Create a new HTML file
Add a script tag with 'type' attribute set to 'text/javascript'
Inside the script tag, use document.write() to display 'Hello World!'
Swap two numbers without using a temporary variable.
Use addition and subtraction to swap the values
Use XOR operator to swap the values
Use multiplication and division to swap the values
To add 2 tables, we need to use a join operation on a common column.
Identify the common column between the tables
Choose the appropriate join type (inner, outer, left, right)
Write the SQL query to join the tables
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column
Union combines and removes duplicates, Union All combines all rows including duplicates.
Union is used to combine the result sets of two or more SELECT statements and remove duplicates.
Union All is used to combine the result sets of two or more SELECT statements and includes all rows, including duplicates.
Union is slower than Union All as it has to remove duplicates.
Union requires the same number of columns in all SELEC...
Being assigned a project with unrealistic deadlines and minimal guidance
Received a project with tight deadlines and unclear requirements
Struggled to meet the deadlines due to lack of guidance and support
Had to work long hours and weekends to try to complete the project
Learned the importance of clear communication and setting realistic expectations
Code for rand7 using rand5 function
Use rand5 twice to generate a number in [1,25] with equal probability
If the number is greater than 21, discard and try again
Otherwise, return (number mod 7) + 1
LRU cache is implemented using a doubly linked list and a hash map.
Create a doubly linked list to keep track of the order of elements in the cache.
Create a hash map to store the key-value pairs of the cache.
When a new element is added, check if the cache is full. If it is, remove the least recently used element from the linked list and the hash map.
When an element is accessed, move it to the front of the linked list to...
Function to randomly select pivot element in Quick Sort
Generate a random index within the range of the array
Return the element at the randomly generated index as the pivot
posted on 2 Dec 2015
based on 1 interview
Interview experience
Associate
3.1k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Manager
2.4k
salaries
| ₹0 L/yr - ₹0 L/yr |
Manager
1.9k
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Associate
1.6k
salaries
| ₹0 L/yr - ₹0 L/yr |
Vice President
1.3k
salaries
| ₹0 L/yr - ₹0 L/yr |
JPMorgan Chase & Co.
Goldman Sachs
TCS
Deloitte