Skip to content

Twitter (X) Placement Papers 2025

Overview

This page is a working set of Twitter (X) placement papers from 2025: from student reports questions, the 2025 online assessment pattern, and step-by-step solutions. Use it to see what Twitter (X) actually asked in the latest cycle, how hard the rounds were, and which themes (DSA, system design, aptitude, or role-specific topics) mattered most. Practice the problems below under timed conditions, then cross-check with the interview and preparation guides if you are targeting an upcoming Twitter (X) drive.

Twitter Online Assessment 2025 pattern

Section Questions Time Difficulty
Coding Problems 2-3 90 min Medium-Hard

X Placement Papers 2025 - actual questions & solutions

This section contains practice questions styled on X (Twitter) placement papers 2025 (recent-cycle pattern), with worked solutions. Use them as timed sectional drills - from student reports drives vary by college and role, so treat this as a high-signal practice bank, not an official paper dump.

Question 1: maximum subarray sum

Show solution

Problem Statement: Find the contiguous subarray with the largest sum.

Example:

Input: [-2, 1, -3, 4, -1, 2, 1, -5, 4]
Output: 6 // [4, -1, 2, 1]

Solution (Java):

public int maxSubArray(int[] nums) {
int best = nums[0], cur = nums[0];
for (int i = 1; i < nums.length; i++) {
cur = Math.max(nums[i], cur + nums[i]);
best = Math.max(best, cur);
}
return best;
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 2: longest common prefix

Show solution

Problem Statement: Find the longest common prefix string amongst an array of strings.

Example:

Input: ["flower","flow","flight"]
Output: "fl"

Solution (Java):

public String longestCommonPrefix(String[] strs) {
if (strs.length == 0) return "";
String pref = strs[0];
for (int i = 1; i < strs.length; i++) {
while (!strs[i].startsWith(pref)) {
pref = pref.substring(0, pref.length() - 1);
if (pref.isEmpty()) return "";
}
}
return pref;
}

Time Complexity: O(S)
Space Complexity: O(1)

Question 3: binary tree level order

Show solution

Problem Statement: Return the level-order traversal of a binary tree.

Example:

Input: [3,9,20,null,null,15,7]
Output: [[3],[9,20],[15,7]]

Solution (Java):

public List<List<Integer>> levelOrder(TreeNode root) {
List<List<Integer>> res = new ArrayList<>();
if (root == null) return res;
Queue<TreeNode> q = new ArrayDeque<>();
q.add(root);
while (!q.isEmpty()) {
int sz = q.size();
List<Integer> level = new ArrayList<>();
for (int i = 0; i < sz; i++) {
TreeNode n = q.poll();
level.add(n.val);
if (n.left != null) q.add(n.left);
if (n.right != null) q.add(n.right);
}
res.add(level);
}
return res;
}

Time Complexity: O(n)
Space Complexity: O(n)

Question 4: rotate array right by k

Show solution

Problem Statement: Rotate the array to the right by k steps.

Example:

Input: [1,2,3,4,5,6,7], k = 3
Output: [5,6,7,1,2,3,4]

Solution (Java):

public void rotate(int[] nums, int k) {
k %= nums.length;
reverse(nums, 0, nums.length - 1);
reverse(nums, 0, k - 1);
reverse(nums, k, nums.length - 1);
}
void reverse(int[] a, int l, int r) {
while (l < r) { int t = a[l]; a[l++] = a[r]; a[r--] = t; }
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 5: detect cycle in linked list

Show solution

Problem Statement: Return true if the linked list has a cycle.

Example:

Input: 3→2→0→-4→(back to 2)
Output: true

Solution (Java):

public boolean hasCycle(ListNode head) {
ListNode slow = head, fast = head;
while (fast != null && fast.next != null) {
slow = slow.next;
fast = fast.next.next;
if (slow == fast) return true;
}
return false;
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 6: two sum

Show solution

Problem Statement: Given an array of integers and a target, return indices of two numbers that add up to target.

Example:

Input: nums = [2, 7, 11, 15], target = 9
Output: [0, 1]

Solution (Java):

public int[] twoSum(int[] nums, int target) {
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < nums.length; i++) {
int need = target - nums[i];
if (map.containsKey(need)) return new int[]{map.get(need), i};
map.put(nums[i], i);
}
return new int[]{};
}

Time Complexity: O(n)
Space Complexity: O(n)

Question 7: climbing stairs

Show solution

Problem Statement: You can climb 1 or 2 steps. How many distinct ways to climb n stairs?

Example:

Input: n = 4
Output: 5

Solution (Java):

public int climbStairs(int n) {
if (n <= 2) return n;
int a = 1, b = 2;
for (int i = 3; i <= n; i++) {
int c = a + b; a = b; b = c;
}
return b;
}

Time Complexity: O(n)
Space Complexity: O(1)

Question 8

Q8: Which SQL clause filters grouped rows after GROUP BY?

Solution:

HAVING filters aggregates; WHERE filters rows before grouping.

Answer: HAVING

Question 9

Q9: Worst-case time complexity of quicksort is?

Solution:

Unbalanced partitions (already sorted with bad pivot) → O(n²).

Answer: O(n²)

Question 10

Q10: Time complexity of binary search on a sorted array of n elements is?

Solution:

Each step halves the search space → O(log n).

Answer: O(log n)

Question 11

Q11: Which protocol is connection-oriented at the transport layer?

Solution:

TCP is connection-oriented; UDP is connectionless.

Answer: TCP

Key insights from 2025 twitter Online Assessment

  1. Coding Section is Critical: Must solve 2-3 coding problems correctly to advance
  2. Real-Time System Design: Strong emphasis on real-time systems and feed generation
  3. Time Management: 2-3 coding problems in 90 minutes requires excellent speed
  4. Success Rate: Only 10-15% cleared OA and advanced to interviews
  5. Platform: Twitter’s assessment platform or HackerRank
  6. Focus Areas: Arrays, trees, graphs, dynamic programming, real-time systems, feed algorithms
  7. Enhanced Emphasis: Optimal solutions and AI-powered features

Twitter 2025 interview experiences

Based on recent candidate experiences from 2025 Twitter (X) interviews:

2025 Interview Process:

  1. Online Assessment (90 minutes): 2-3 coding problems
  2. Technical Phone Screen (45-60 minutes): Coding problems, algorithm discussions, system design, AI features
  3. Onsite/Virtual Interviews (4-5 rounds, 45-60 minutes each):
  • Coding rounds (2-3): Algorithms, data structures, problem-solving
  • System Design rounds: Real-time feed systems, social media platforms, AI-powered features, scalability
  • Behavioral rounds: Problem-solving approach, innovation, teamwork, impact

2025 Interview Trends:

  • Increased emphasis on AI-powered features and real-time systems
  • More focus on optimal solutions and system design
  • Enhanced behavioral questions about innovation and impact
  • Questions about Twitter’s AI features and real-time processing

Common 2025 Interview Topics:

  • Coding: Arrays, strings, trees, graphs, dynamic programming, feed generation algorithms
  • System Design: Real-time feed systems, social media platforms, AI-powered features, scalability
  • Behavioral: Problem-solving, innovation, teamwork, impact, AI/ML passion
  • Twitter Technologies: Feed generation, real-time systems, AI features, social media algorithms

Success Tips:

  • Strong coding performance is essential - solve problems optimally
  • Practice system design for real-time systems and AI-powered social media platforms
  • Prepare examples demonstrating innovation and problem-solving
  • Learn Twitter’s products, AI features, and real-time systems
  • Practice explaining your thought process clearly

For detailed interview experiences from 2025, visit Twitter Interview Experience page.

Preparation tips for twitter 2025 pattern

  1. Master Coding Fundamentals: Focus on solving 2-3 coding problems correctly - arrays, trees, graphs, DP
  2. System Design Mastery: Learn real-time system design, feed generation, AI-powered social media platforms
  3. Practice Previous Year Papers: Solve Twitter OA papers from 2020-2025 to understand evolving patterns
  4. Time Management: Practice completing 2-3 coding problems in 90 minutes
  5. LeetCode Practice: Solve 200+ LeetCode problems focusing on arrays, strings, trees, graphs (medium-hard difficulty)
  6. Real-Time Systems: Understand real-time feed generation, social media algorithms, AI features, scalability
  7. Twitter Technologies: Learn feed generation, trending topics, AI-powered features, real-time systems
  8. Behavioral Preparation: Prepare examples using STAR format - innovation, problem-solving, impact
  9. Mock Tests: Take timed practice tests to improve speed and accuracy
  10. Distributed Systems: Understand distributed systems, scalability, and real-time processing
  11. AI/ML Basics: Understand AI/ML fundamentals and applications in social media

Comments & Suggestions

Similar companies

Google · Meta · Amazon · Microsoft · Apple · Netflix