Morgan Stanley - 2023 Technology Full Time Analyst (Hong Kong) Code Test

There are total 6 questions in HackerRank. Candidate has 2 hours to finish 6 questions (2 Coding questions + 4 MC questions)

Q1: HackerRank First Unique Character.

The question is similar to this leetcode question.
https://leetcode.com/problems/first-unique-character-in-a-string/

Q2: HackerRank Visitng Cities

MC3: Given the Oracle SQL query. How many rows does the final output have?

SELECT * FROM employees WHERE ROWNUM > 10;

MC4: Which of the following graph is the correct Heap?

MC5: Preemptive Priority Scheduling

Given the arrival times, the burst times, and the priorities of 5 processers, calculate the averatge waiting time if they follow the Preemptive Priority scheduling algorithm. Pick ONE option.


Process:            Arrival Times:            Burst Time:                  Priority:
P1                         0                                   7                                 4
P2                         1                                   3                                 2
P3                         2                                   1                                 1    
P4                         4                                   3                                 3
P5                         7                                   2                                 5

A. 6.4
B. 6.8
C. 7.0
D. 7.2

MC6: Max Stack
Find the maximum length the stack will have if it performs the following operations. Pick ONE Option.

  1. Push(10);
  2. Pop();
  3. Push(17);
  4. Push(29);
  5. Push(6);
  6. Pop();
  7. Push(10);
  8. Push(77);
  9. Pop();

A. 3
B. 5
C. 4
D. None of the above

Comments (2)