Autocoder

Morgan Stanley interview questions with answers (technology analyst)

Last updated 2026-11-19

Morgan Stanley hires technology analysts in India, with its engineering centres in Mumbai and Bengaluru. Candidates commonly describe interviews that go beyond coding into core CS: OOP, operating systems, databases and networks, followed by managerial and HR conversations.

The thirteen questions below are practice in that style, with worked answers. They are not past questions. For the online test, see Morgan Stanley coding round questions.

Typical rolesTechnology Analyst, Technology Summer Analyst (India)
Rounds, as commonly reportedOnline assessment, technical interviews, managerial or HR interview
Heavy topicsOOP, DSA, OS, DBMS, networks, projects
Hiring newsSee Hiring status below

Rounds as commonly reported

The usual pattern reported is an online assessment with coding and technical or aptitude MCQs, then one or more technical interviews and a managerial or HR round. The order and number of rounds differ between programmes and years.

Technical interviewers often probe the resume. Be ready to explain every technology you list, a project's design choices and one thing you would change. Several candidates describe questions that start easy and keep getting deeper on the same topic, so know the fundamentals well enough to go three levels down.

What to prepare

Hiring status

For news that changes month to month, see Morgan Stanley hiring, which is updated from sourced reports. This page keeps only the facts below, each with its source.

For current graduate and analyst openings, use Morgan Stanley's own students and graduates careers site.

Morgan Stanley interview questions with answers (technology analyst): questions with worked answers

  1. 1

    What is a virtual function in C++, and how does the vtable make it work?

    medium

    A virtual function is resolved at run time based on the object's dynamic type. Each class with virtual functions has a vtable, an array of function pointers, and each object carries a hidden pointer (vptr) to its class's table, so a call through a base pointer jumps to the derived override. This costs one extra pointer per object and one indirect call. Make destructors virtual in base classes; deleting a derived object through a base pointer without it is undefined behaviour. Pure virtual functions make a class abstract.

  2. 2

    What is wrong with a Python function that has a list as a default argument?

    easy

    Default values are evaluated once when the function is defined, so every call that omits the argument shares the same list and appends accumulate across calls. The fix is to default to None and create a new list inside. This question tests whether you understand Python's object model, which matters in a role where you debug other people's code.

    python
    def add(x, bucket=None):
        if bucket is None:
            bucket = []
        bucket.append(x)
        return bucket
  3. 3

    Which sorting algorithm would you choose for 10 million records already mostly sorted, and why?

    medium

    Insertion sort is O(n) on nearly sorted data but O(n^2) in the worst case, so it is only safe when the disorder is bounded. A safer choice is Timsort, which Python and Java (for objects) use: it detects existing runs and merges them, giving O(n) on sorted input and O(n log n) worst case, and it is stable. If memory is tight and stability is not needed, heap sort is O(n log n) in place. Always mention stability when sorting records by multiple keys.

  4. 4

    Validate whether a binary tree is a binary search tree.

    medium

    Pass an allowed range down the recursion: every node must lie strictly between a lower and an upper bound inherited from its ancestors. Checking only a node against its immediate children is the classic wrong answer, because it misses a value in the left subtree of the left child that exceeds the root. Time O(n), space O(h) for the recursion. An in-order traversal that must be strictly increasing is an equivalent check.

    python
    def is_bst(node, lo=float('-inf'), hi=float('inf')):
        if node is None:
            return True
        if not (lo < node.val < hi):
            return False
        return is_bst(node.left, lo, node.val) and is_bst(node.right, node.val, hi)
  5. 5

    Explain paging, page faults and thrashing.

    medium

    Paging splits the virtual address space into fixed-size pages mapped to physical frames through a page table, with a TLB caching recent translations. A page fault occurs when the page is not in memory, and the OS loads it from disk, which is thousands of times slower than a memory access. Thrashing happens when the combined working sets of running processes exceed physical memory, so the system spends most of its time swapping. Remedies are reducing the degree of multiprogramming, using working-set based allocation, or adding memory. Effective access time = (1 - p) x memory time + p x fault service time.

  6. 6

    Normalise a table Orders(order_id, customer_id, customer_name, product_id, product_name, qty) to third normal form.

    medium

    The table already has atomic values, so it is in 1NF. customer_name depends only on customer_id and product_name only on product_id, which are partial or transitive dependencies on the key (order_id, product_id). Split into Customer(customer_id, customer_name), Product(product_id, product_name), Orders(order_id, customer_id) and OrderItem(order_id, product_id, qty). This removes update anomalies: renaming a customer touches one row. Mention that analytical systems sometimes denormalise on purpose for read speed.

  7. 7

    What happens, step by step, when you type a URL into a browser and press Enter?

    medium

    The browser checks its caches, then resolves the domain through DNS to an IP address. It opens a TCP connection (three-way handshake) and, for HTTPS, a TLS handshake to agree keys and verify the certificate. It sends an HTTP request, the server responds, and the browser parses HTML, fetches CSS, scripts and images, builds the DOM and renders. Mention connection reuse, HTTP/2 multiplexing and CDN caching if you want depth. TCP gives ordered reliable delivery while UDP does not, which is why DNS often uses UDP.

  8. 8

    How does garbage collection work in Java, and what causes a memory leak despite it?

    hard

    The JVM frees objects that are no longer reachable from GC roots such as thread stacks and static fields. Generational collectors put new objects in a young generation, collected often and cheaply, and promote survivors to an old generation, collected less often. A leak in Java means objects that are still reachable but no longer needed: a static map that is never cleared, listeners that are never deregistered, or unbounded caches. Fix with bounded caches, weak references where appropriate, and a heap dump to see what holds the objects.

  9. 9

    Design the core of an order book for one stock: add buy and sell limit orders and match them.

    hard

    Keep two priority queues: buys in a max-heap by price and sells in a min-heap by price, with arrival time as the tie-breaker to give price-time priority. On a new buy, while the best sell price is at or below the buy price, trade at the resting order's price, reducing quantities and removing filled orders; any remainder rests in the book. Each insert and removal is O(log n). Use integer ticks or BigDecimal for prices. Cancellation needs a map from order id to order and lazy deletion from the heap.

  10. 10

    What is the time complexity of building a heap from n elements, and why is it not O(n log n)?

    hard

    It is O(n). Bottom-up heapify sifts down every internal node; a node at height h costs O(h), and there are about n / 2^(h+1) nodes at height h. The sum of h x n / 2^(h+1) over all heights converges to O(n). Inserting n elements one by one is O(n log n). This is why Python's heapq.heapify is linear while repeated heappush is not.

  11. 11

    Why Morgan Stanley, and why technology in finance?

    easy

    Say what draws you to the problems: building systems where correctness and latency are measurable, such as pricing, risk or trade processing. Connect to something concrete, for example a project that handled money-like data or a course on distributed systems. Show that you understand a technology analyst works with business users. Avoid claiming facts about the firm that you have not read in its own materials.

  12. 12

    What are your strengths and weaknesses?

    easy

    Pick one strength you can prove with an example and one real weakness with a concrete fix in progress, such as moving from solving problems alone to asking for review earlier, with the habit you now follow. A weakness that is really a strength in disguise reads as evasive. Keep both answers under a minute and tie the strength to the role.

  13. 13

    Tell me about a time you had to deliver under a tight deadline.

    medium

    Give the situation, the deadline and what you cut or sequenced. Explain how you split the work, what you communicated to teammates or your guide, how you tested before delivering, and the outcome. Add what you would plan differently. Interviewers look for prioritisation and honest communication more than heroics.

Frequently asked questions

Does Morgan Stanley ask C++ or Java?

Candidates report questions in several languages, most often C++, Java or Python depending on the resume. Prepare OOP and memory concepts in the language you list.

How deep do the OS and DBMS questions go?

Commonly to the level of paging, deadlock, normalisation, indexing and transactions with examples. Expect follow-ups on trade-offs.

Is there an HR round?

Candidates commonly report a managerial or HR conversation near the end. Prepare real stories rather than scripted answers.

Where do I find current openings?

Use Morgan Stanley's own careers site and the sourced notes on the Morgan Stanley hiring page.

Sources

Related guides

More in Company Interview Questions

See all in this section