21 MSCI Online Coding Test Questions and Answers | Morgan Stanley

21 MSCI Online Coding Test Questions and Answers | Morgan Stanley

MSCI is formerly known as Morgan Stanley Capital International.

MSCI online coding questions test was conducted on the Hackerrank platform.

It’s 100 minutes online test which includes 21 questions. You have two hours to complete this test.

As I remember out of those 21 questions, there were three coding questions and one SQL database query to write. The rest of the questions are MCQs.

Time is sufficient for this test but the questions in this test are quite confusing. There can be multiple correct options in MCQ test.

Hackerrank Morgan Stanley Test Questions

Here are some of the multiple-choice questions asked in the test as I remember.

MCQ Questions

Questions from Web Development and Computer Network

  • How many numbers of HTTP status code groups/categories are there?
    Answer: There are 5 categories of HTTP status code.
  • What HTTP status code is used for unauthorized access?
    Answer: Correct answer is 401.
  • What HTTP status code is used to access forbidden errors?
    Answer: Correct answer is 403.
  • One question was on SQL and NoSQL. From the given options you have to choose the correct statements.
    Hint: Knowing the difference between SQL and NoSQL will help you to answer these types of questions.

Questions from JavaScript

  • What is the difference between == and === operators in JavaScript?

There were couple of more questions on JavaScript that I don’t remember right now.

Questions from HTML and CSS

  • In HTML and CSS, is a class attribute accessed by # or .?
    Answer: The class attribute is accessed by ..

Questions from Data Structure and Algorithm

  • In level order traversal of a binary tree, which data structure is used among queue and stack?
    (Refer difference between stack and queue.)
  • On which data structure you can perform delete operation from the beginning or end with O(1). You have given options of stack, deque, and vector.
    Answer: The correct answer is a deque. It is a double-ended queue. With this, you can delete or add an element at the front or back in the constant time of O(1).
  • What is the inorder traversal of a given below binary tree?
reorder, inorder and post order traversal

Answer: 7 1 3 4 5 6 (Refer Binary Tree Traversal Algorithms.)

Questions from Python Programming

As I have applied for the Python full stack developer job profile, there were questions from Python programming.

  • You have given Python code for the Fibonacci series using a generator. What is the output of it?
  • Is the print statement or function in Python 3?
    Answer: In Python 2, print is the statement. Whereas in Python 3, print is the function.
  • What is the output of the following code?
data = [2, 4, 4, {}, None, ()]

Answer: Even though we have a NoneType object, an empty dictionary, and an empty list in the data list, the length of the list is 6.

If you are looking for a job as a Python developer, check out the Python interview questions guide. It includes interview questions asked in product-based companies explained in detail.

SQL Query

There was one question on the SQL query where you have to perform SQL join operation.

Given tables:

EMPLOYEE (id, name, address)
EMPLOYEE_UIN (id, uin)

You have to print the name of all employee with their UIN number. If the employee don’t have UIN number, display UIN number as ‘None’.

Note: employee id is the primary key in the EMPLOYEE table and the foreign key in EMPLOYEE_UIN which can be used to perform join operation.

Hint: This is the simple SQL query. You should be knowing basic MySQL commands and join operations.

MSCI Online Coding Questions

  • Find the minimum index from the array so that the sum of the left and right subarray is the same.
    Answer: This question is similar to write a code to split the array into an equal sum subarray.
  • Write a function that takes another function as input and returns the output of the given function by reverse function attributes.
  • There was a question where you have to read the data from JSON URL (s, p) and then parse this data based on the given criteria- countries having substring s and a population greater than p.

You have to pass all the given testcases for at least two coding questions.

To crack these coding questions, make habit of solving competitive coding questions.

This is all about MSCI online coding questions. If you have any doubt, let us know in the comment. All the best!

Editors’ Note: This Morgan Stanley interview experience is shared by the candidate Nishab Kumar. We wish him all the best!

1 Comment

  1. Great article! The tips and explanations provided in this coding test guide from Morgan Stanley were really helpful and easy to understand – definitely worth checking out for any aspiring programmers.

Leave a Reply

Your email address will not be published. Required fields are marked *