← Back to blog Meta University Intern VO Debrief: Subsequence Counting + In-Place Duplicate Finding + Internship Timeline
Meta

Meta University Intern VO Debrief: Subsequence Counting + In-Place Duplicate Finding + Internship Timeline

2026-06-03

Meta's intern VO problems are not obscure, but almost every one has a follow-up that forces you to optimize the brute force to optimal, or rewrite it under a constraint. This article debriefs two realistic VO problems - one subsequence-counting, one in-place duplicate finding - then adds the Meta 12-week internship timeline so you know which weeks actually decide the return offer.

VO 1: Count How Many Words Are Subsequences of s

Given a main string s and an array of strings words, count how many of words are subsequences of s.

Example: s = "abc", words = ["a", "bb", "acd", "ace"] -> output 2 ("a" and "ace" are subsequences)

Baseline: Two Pointers

For each word, scan with two pointers: when the current character matches, both pointers advance; otherwise only the main-string pointer moves. If the word pointer reaches the end, it is a subsequence.

def is_subsequence(word, s):
    i = 0  # pointer into word
    for ch in s:
        if i < len(word) and word[i] == ch:
            i += 1
    return i == len(word)

def count_subsequences(s, words):
    return sum(is_subsequence(w, s) for w in words)

Complexity: O(m * n), m = total length of all words, n = len(s).

Follow-up: Many words, long s - how do you optimize?

Idea: preprocess s into a charIndex - record all positions (ascending) where each character appears in s. For each character of a word, use binary search to quickly locate the next occurrence "after the previous match."

from bisect import bisect_right
from collections import defaultdict

def build_index(s):
    idx = defaultdict(list)
    for i, ch in enumerate(s):
        idx[ch].append(i)
    return idx

def is_subseq_fast(word, idx):
    prev = -1  # last matched position
    for ch in word:
        positions = idx.get(ch)
        if not positions:
            return False
        # find the first position > prev
        j = bisect_right(positions, prev)
        if j == len(positions):
            return False
        prev = positions[j]
    return True

def count_subsequences_fast(s, words):
    idx = build_index(s)
    return sum(is_subseq_fast(w, idx) for w in words)

Complexity: preprocessing O(n), each word O(k * log n) via binary search, k = average word length. Total O(n + m * k * log n) - far better than brute force when there are many words.

Narration point: present the two-pointer baseline first, then state "the main string is fixed and we query it many times -> preprocess + binary search" as the optimization motive. Interviewers value this derivation most.

VO 2: Find All Duplicates in an Array, In Place

An array of length n where each element x satisfies 0 <= x <= n-1. Find all duplicate elements.

Example: input = [3, 1, 2, 3, 0] -> output = [3] Follow-up: no extra space, no recursion or function calls.

Core Idea: Swap Into Position

Each element x belongs at index x. Iterate, swapping the current element to where it belongs; if the target position already holds the correct value, you have found a duplicate.

def find_duplicates(array):
    n = len(array)
    res = []
    i = 0
    while i < n:
        x = array[i]
        # x belongs at index x
        if array[i] != i:
            if array[array[i]] == array[i]:
                # target position already has the correct value -> duplicate
                if array[i] not in res:
                    res.append(array[i])
                i += 1
            else:
                # swap into position
                array[array[i]], array[i] = array[i], array[array[i]]
        else:
            i += 1
    return res

Complexity: time O(n), space O(1). Key: every swap places one element into its correct position, so the total number of swaps is O(n) - the while loop does not degrade to O(n^2).

Follow-up satisfied: no extra space (in-place swaps), no recursion, no extra function calls - fully within the constraints.

Meta Internship Timeline: Which Weeks Decide the Return Offer

Many people do not realize that the Meta internship evaluation really only counts the first 10 weeks. For a 12-week internship:

Week Stage Notes
Week 1-3 Onboarding settle in, get a mentor, start the first task
Week 5-6 Mid-cycle review midpoint feedback, sets the second-half direction
Week 10-11 Final decision the return offer is decided here
Week 11-12 Wind down evaluation is over, enjoy the last two weeks

Core reminder: only your performance in weeks 1-10 counts toward the internship evaluation. So define your project scope clearly early, sync frequently with your mentor, and make sure the Week 5-6 mid-cycle review yields concrete feedback you can act on.

Preparation Advice

FAQ

Q1: Is Meta University very different from a regular intern VO? The question types are close - both "Medium + follow-up." Meta University leans a bit more toward basic data structures, two pointers, and array manipulation.

Q2: How many rounds is the VO? Internships usually have 1-2 coding VO rounds (2 problems each) plus behavioral.

Q3: Can I use Python? Yes. Meta is language-agnostic; Python writes two pointers and in-place swaps concisely, which suits explaining your thinking.

Q4: If early performance is mediocre, can I still turn it around? Yes, but act early. The Week 5-6 mid-cycle review is the key correction point - adjust right after getting feedback and there is still time.


Preparing for the Meta intern VO?

If you can write the baseline but stall on follow-ups, are not fluent with in-place operations, or want a real person syncing with you for real-time cues on interview day, let's talk through a full plan: focused high-frequency question coaching + timed mocks + full real-time support + per-problem debrief.


Contact

Need real interview questions and a tailored prep plan? Message WeChat Coding0201 now, get the question bank.

Email: [email protected] Telegram: @OAVOProxy