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 appeared for an interview 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 appeared for an interview 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 appeared for an interview in Nov 2020.
Round duration - 50 minutes
Round difficulty - Hard
Timing (10 am- 10:50 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 50 minutes.
This time I had to face three technical questions and one general question on Finance banks.
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 to the result list.
Sort the result list based on the criteria mentioned in the problem statement.
Given a binary tree with N
nodes, determine whether the tree is a Binary Search Tree (BST). If it is a BST, return true
; otherwise, return false
.
A binary search tree (BST)...
Validate if a binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Ensure both the left and right subtrees are also binary search trees.
Traverse the tree in an inorder manner and check if the elements are in sorted order.
Recursively valid...
Round duration - 35 minutes
Round difficulty - Medium
There was only one interviewer for this round. He continuously interacted with me and was giving me some good situational problems that were not very easy to answer. Basically those were open-minded questions which can be answered oth ways and that's why I found it quiet hard as per my nature but at the end things went well for me.
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
Morgan Stanley interview questions for designations
posted on 20 May 2017
I appeared for an interview in May 2017.
Yes, the string class can be extended in most programming languages.
Inheritance can be used to extend the functionality of the string class.
By creating a new class that inherits from the string class, additional methods and properties can be added.
Extending the string class allows for customization and adding specific functionality to strings.
Example: In Python, the string class can be extended by creating a new class
Implicit objects in JSP are predefined objects that are available for use without any declaration or initialization.
Implicit objects in JSP include request, response, session, application, out, config, pageContext, page, exception, and others.
These objects provide access to various aspects of the JSP environment and can be used to perform common tasks.
For example, the request object allows access to HTTP request parame...
A hash map is a data structure that uses a hash function to map keys to values.
Hash map stores key-value pairs
It uses a hash function to compute an index for each key
Collisions can occur when two keys hash to the same index
Hash maps provide fast access to values based on their keys
StringBuffer and StringBuilder are both used to manipulate strings, but StringBuffer is thread-safe while StringBuilder is not.
StringBuffer is synchronized, making it safe for use in multi-threaded environments.
StringBuilder is not synchronized, making it faster but not thread-safe.
StringBuffer is preferred when multiple threads are involved, while StringBuilder is preferred for single-threaded scenarios.
Both classes p...
MVC is a software architectural pattern that separates an application into three main components: Model, View, and Controller.
Model represents the data and business logic of the application.
View is responsible for displaying the user interface.
Controller handles user input, updates the model, and interacts with the view.
MVC promotes separation of concerns and modularity in software development.
Example: In a web applica...
Annotations used in RESTful web services
1. @Path - Specifies the URI path for the resource
2. @GET - Specifies that the method handles HTTP GET requests
3. @POST - Specifies that the method handles HTTP POST requests
4. @PUT - Specifies that the method handles HTTP PUT requests
5. @DELETE - Specifies that the method handles HTTP DELETE requests
6. @PathParam - Binds the value of a URI template parameter to a method paramete...
I have a strong background in software engineering and a passion for innovation, making me a valuable asset to HSBC.
I have a proven track record of successfully delivering high-quality software solutions in previous roles.
I am highly skilled in various programming languages and technologies, including Java, Python, and SQL.
I have experience working in agile development environments, allowing me to adapt quickly to chan...
posted on 10 May 2015
Multi tasking, multi processing, and multi programming are different approaches to managing tasks in an operating system.
Multi tasking allows multiple tasks to run concurrently on a single processor.
Multi processing involves multiple processors running tasks simultaneously.
Multi programming allows multiple programs to be loaded into memory and executed concurrently.
Examples of multi tasking operating systems include Wi...
Memory allocation refers to the process of assigning memory to programs during runtime.
Stack allocation is done automatically and is limited in size.
Heap allocation is done manually and is larger in size.
Stack memory is used for local variables and function calls.
Heap memory is used for dynamic memory allocation.
Memory leaks can occur if heap memory is not properly managed.
Use a shared variable and synchronization mechanisms to ensure natural order printing of numbers.
Create two threads, one for printing even numbers and the other for printing odd numbers.
Use a shared variable to keep track of the current number to be printed.
Implement synchronization mechanisms like locks or semaphores to ensure only one thread can access the shared variable at a time.
Each thread should check if it is i...
Printing a matrix in spiral order
Start from the first element and print it
Move in a spiral order towards the center of the matrix
Repeat until all elements are printed
Thread class and Runnable Interface are used for multithreading in Java.
Thread class is a predefined class in Java that provides methods to create and control threads.
Runnable interface is used to define a task that can be executed by a thread.
Thread class implements Runnable interface.
Thread class provides more control over threads than Runnable interface.
Example: Thread t = new Thread(new MyRunnable()); t.start();
Exa...
Linked List is a dynamic data structure while ArrayList is a static data structure.
Linked List is best for frequent insertion and deletion operations.
ArrayList is best for frequent access operations.
Linked List uses more memory than ArrayList.
ArrayList is faster than Linked List for accessing elements.
Use Linked List when you need to frequently add or remove elements from the list.
Use ArrayList when you need to frequen
I am not interested in a career in investment banking.
I am more interested in a career in software development
I enjoy problem-solving and creating innovative solutions through coding
Investment banking does not align with my passion and skill set
I have chosen to apply to J.P. Morgan because of their reputation, global presence, and opportunities for growth.
J.P. Morgan has a strong reputation in the financial industry.
They have a global presence with offices in multiple countries.
The company offers various opportunities for career growth and development.
J.P. Morgan is known for its innovative technology solutions in the financial sector.
I am impressed by their ...
Yes, I have made a mistake in my previous project.
I underestimated the complexity of a task and ended up missing the deadline.
I failed to properly test a feature, resulting in a bug that affected user experience.
I accidentally deleted an important file without having a backup.
I misunderstood a requirement and implemented a feature incorrectly.
I appeared for an interview before Sep 2020.
Round duration - 30 minutes
Round difficulty - Easy
It was in the day time. I was asked the programming language of my choice. It was mostly focused on programming fundamentals. I was asked 2 questions based on Data Structures and Algorithms.
A loop in a linked list can be detected using Floyd's Cycle Detection Algorithm.
Use two pointers - slow and fast, where slow moves one step at a time and fast moves two steps at a time.
If there is a loop, the two pointers will eventually meet at some point within the loop.
To detect the start of the loop, reset one pointer to the head and move both pointers one step at a time until they meet again.
Round duration - 30 minutes
Round difficulty - Easy
This round was mostly focused on my resume and projects.
Round duration - 30 minutes
Round difficulty - Easy
It was in the evening. I went to their office in Gurgaon. It was taken by one of the technology director who had a lot of experience.
Do practice a lot of data structures questions as mostly questions in interviews are based on them. Also, do prepare for projects mentioned in your resume and skills which you have mentioned. Coding ninjas has a big hand in making my interview clear as I have taken a course from the coding Ninjas which helped me a lot to make my concepts clear.
Application resume tips for other job seekersKeep it short and crisp. Go through it properly before the interview. Make sure that you haven't put anything in it that can cause you problems during the interview.
Final outcome of the interviewSelectedposted on 11 Mar 2022
I appeared for an interview before Mar 2021.
Round duration - 90 Minutes
Round difficulty - Medium
This was an online coding round where we had 2 questions of Medium to Hard level of difficulty to solve under 90 minutes. I was able to solve the 2nd question fully and the 1st one partially. 10 students were shortlisted for further rounds and I was one of them.
You are provided with a string STR
of length N
. The goal is to identify the longest palindromic substring within this string. In cases where multiple palind...
Given a string, find the longest palindromic substring, choosing the one with the smallest start index if multiple exist.
Iterate through the string and expand around each character to find palindromes
Keep track of the longest palindrome found and its starting index
Return the longest palindromic substring with the smallest start index
You are given an array of integers ARR
and an integer X
. Your task is to determine the number of subarrays of ARR
whose bitwise XOR is equal to X
.
Count the number of subarrays in an array whose XOR is equal to a given value.
Iterate through the array and keep track of XOR values and their frequencies using a hashmap.
For each element, calculate the XOR with the previous elements to find subarrays with XOR equal to the given value.
Use the hashmap to efficiently count the number of subarrays with the desired XOR value.
Handle edge cases like XOR value being 0 separat...
Round duration - 70 Minutes
Round difficulty - Medium
This was a preety intense round where I had to solve 3 algorithmic questions under 70 minutes. I first explained my approach for each of these questions and also discussed why they were optimal in the first place with their respective time and space compleixities. The interviewer was quite impressed at the end of the round.
You are given a continuous stream of numbers, and the task is to determine the kth largest number at any moment during the stream.
A specialized data st...
Design a data structure to find the kth largest number in a continuous stream of integers.
Design a specialized data structure to handle continuous stream of numbers
Implement add(DATA) function to add integers to the pool
Implement getKthLargest() function to retrieve the kth largest number
Maintain the pool of numbers and update it based on queries
Output the kth largest number for each Type 2 query
You are provided with two sorted linked lists. Your task is to merge them into a single sorted linked list and return the head of the combined linked list.
...Merge two sorted linked lists into a single sorted linked list without using additional space.
Create a dummy node to start the merged list
Compare the values of the two linked lists and append the smaller value to the merged list
Move the pointer of the merged list and the pointer of the smaller value's linked list
Continue this process until one of the linked lists is fully traversed
Append the remaining elements of the o
Develop a Stack Data Structure to store integer values using two Queues internally.
Your stack implementation should provide these public functions:
Implement a stack using two queues to store integer values with specified functions.
Use two queues to simulate stack operations efficiently.
Maintain the top element in one of the queues for easy access.
Ensure proper handling of edge cases like empty stack or invalid operations.
Example: Push elements 5, 10, 15; Pop element 15; Check top element 10; Check size of stack; Check if stack is empty.
Round duration - 30 Minutes
Round difficulty - Easy
This was a typical HR round with some standard Behavioral questions.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
based on 1 interview
Interview experience
Associate
3.2k
salaries
| ₹5.2 L/yr - ₹21 L/yr |
Senior Manager
2.5k
salaries
| ₹16 L/yr - ₹54 L/yr |
Manager
2k
salaries
| ₹10.6 L/yr - ₹42 L/yr |
Senior Associate
1.6k
salaries
| ₹7 L/yr - ₹27 L/yr |
Vice President
1.3k
salaries
| ₹21 L/yr - ₹78 L/yr |
JPMorgan Chase & Co.
Goldman Sachs
TCS
Deloitte