FastPrepOdd-Even Linked List
Problems/Odd-Even Linked List

Odd-Even Linked List

Bloomberg LP logoBloomberg LP● MediumNEW GRADONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report describes joining a list of even nodes and a list of odd nodes, but it does not say the exact variant, the grouping rule or the limits. We used the usual grouping by position (counting from one) and kept the order inside each group. The linked list is passed as a list of values. Our version is about 86% the same as the reported question.

A singly linked list is serialized by the array values, from head to tail. Reorder the existing nodes so every node at an odd one-based position appears first, followed by every node at an even one-based position.

Preserve the original relative order within both position groups and return the reordered values from head to tail. The first node is at position 1.

Function

oddEvenLinkedList(values: int[]) → int[]

Examples

Example 1

values = [1,2,3,4,5]return = [1,3,5,2,4]

Positions 1, 3, and 5 stay in order before positions 2 and 4.

Example 2

values = [2,1,3,5,6,4,7]return = [2,3,6,7,1,5,4]

Grouping depends on node position, not whether a stored value is odd or even.

Example 3

values = []return = []

An empty list remains empty.

Constraints

  • 0 <= values.length <= 100000.
  • -10^9 <= values[i] <= 10^9.

More Bloomberg LP Onsite Interview questions

  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Top K Frequent WordsONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Decode StringPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Minimum Replacements to Make Two Strings AnagramsPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Remove Nth Node From End of ListDruva · ONSITE INTERVIEW
  • Find the Entry of a Linked List CycleQualys · ONSITE INTERVIEWQualys interview questions
  • Detect a Linked-List CyclePaytm · ONSITE INTERVIEWPaytm interview questions
  • Detect a Linked-List CycleCapgemini · ONSITE INTERVIEWCapgemini interview questions
  • Rearrange a Linked List from Alternating EndsConcentric AI · ONSITE INTERVIEWConcentric AI interview questions
  • Palindrome Linked List with RestorationMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Linked List Cycle Entry NodeGoogle · ONSITE INTERVIEWGoogle interview questions
  • Detect and Break a Linked-List CycleAmazon · ONSITE INTERVIEW
  • Find the Entry of a Linked List CyclePeopleStrong · ONSITE INTERVIEWPeopleStrong interview questions
  • Remove a Cycle from a Singly Linked ListExpedia · ONSITE INTERVIEWExpedia interview questions

Interview reports that mention this question

  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
  • Bloomberg New Grad SWE Offer Loops: 14 Experiences (Part 2 of 5)

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public int[] oddEvenLinkedList(int[] values) {
        // Write your code here.
    }

}
Checking account…