[ad_1]
Preparing for a technical interview at a bank can be difficult. With so many possible questions to practice on Leetcode and Hackerrank, and limited time before the interview, it’s not possible to do them all.
But if you get an interview at Morgan Stanley, you’re in luck. All four of these questions appear to have been given to interviewees at banks in 2023.
1. NGO missions
A UK-based engineer reported this question on Leetcode in February. Roughly speaking, it looks like this:
A non-governmental organization has N members with IDs from 1 to N. Previously, members performed similar service activities on weekends.
New regulations have been introduced and the NGO has decided to carry out X kinds of new activities. The previously executed activity now has an ID of 0.
For Y hours over the weekend, a group of members with consecutive member IDs is selected and X new activity types are performed. Members not selected at that time will perform the previous type of activity.
The NGO head needs to find the maximum number of members doing a particular activity type every Y working hours. Write an algorithm that understands this.
Several respondents were quite critical of the phrasing of the question and weren’t sure what to do, but one user in the comments suggested this solution:
2. Office printer
An anonymous Leetcode user also reported encountering this Morgan Stanley coding problem in February.
“The office has four floors, and each floor has four printers. Users need to be able to print using any of the four printers on the floor.
A printer queue cannot contain more than N jobs.
There are two types of printers. color and black and white. B&W printers can only print B&W jobs, while color printers can print both color and B&W jobs.
The problem is a low-level design issue, you have to code your system for queuing prints according to these rules.
3. Cut all
Another Leetcode user asked two questions in a recent Morgan Stanley interview that focused on dynamic programming and subsequences. The first one can be seen below:
4. Deletion of subsequences
The second of the two problems from this interviewee focuses on removing subsequences from an array, showing results when there are no duplicate integers.
One of the respondents suggested the following code as a solution.
Click here to create a profile with eFinancialCareers. Get to know Recruiters Hiring Her Jobs in Technology and Finance by Anonymously Commenting on Articles.
Have a secret story, tip or comment you’d like to share? First contact: alex.mcmurray@efnancialcareers.com.
Please feel free to leave comments at the end of this article. All comments are moderated by humans. Sometimes these humans may be asleep or away from their desks, so it may take some time for your comment to appear. (in which case it won’t).
[ad_2]
Source link