PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Meta

Reverse sublist between equal-value nodes

Last updated: Mar 29, 2026

Quick Overview

This question evaluates linked-list manipulation and pointer-management skills, focusing on reversing an in-place sublist between two nodes with equal values while respecting O(n) time and O(1) extra space constraints.

  • Medium
  • Meta
  • Coding & Algorithms
  • Software Engineer

Reverse sublist between equal-value nodes

Company: Meta

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Given the head of a singly linked list and a target value v that appears at least twice, reverse the sublist starting at the first node with value v and ending at the second node with value v (inclusive). If v appears fewer than two times, return the original list. Provide an in-place O(n) time, O( 1) extra space solution and discuss edge cases (adjacent boundaries, when the sublist includes the head or tail).

Quick Answer: This question evaluates linked-list manipulation and pointer-management skills, focusing on reversing an in-place sublist between two nodes with equal values while respecting O(n) time and O(1) extra space constraints.

Related Interview Questions

  • Solve Tree Columns And Maze Variants - Meta (medium)
  • Solve a Key-Door Corridor Maze - Meta (medium)
  • Solve Array Merge and Parentheses Cleanup - Meta (medium)
  • Solve Two Backtracking Array Problems - Meta (hard)
  • Solve Maze and Suffix Problems - Meta (medium)
Meta logo
Meta
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
3
0

Given the head of a singly linked list and a target value v that appears at least twice, reverse the sublist starting at the first node with value v and ending at the second node with value v (inclusive). If v appears fewer than two times, return the original list. Provide an in-place O(n) time, O(

  1. extra space solution and discuss edge cases (adjacent boundaries, when the sublist includes the head or tail).

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Software Engineer•Meta Software Engineer•Meta Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.