← Questions

Convert a sorted linked list to a height-balanced BST

0
MetaCodingLast asked Nov 2026

A coding interview question asked in Meta's technical phone screen, last asked Nov 2026. It tests linked list, binary search tree and recursion.

You get the head of a singly linked list whose values are in strictly increasing order. Build a binary search tree holding exactly those values that is height-balanced: at every node, the two subtrees' heights differ by no more than one.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Meta · Technical phone screen · Last asked Nov 202645 min · Two coding problems in CoderPad, about 20 minutes each · Usually no AI; some newer screens are AI-assisted

What it tests

linked list · binary search tree · recursion

Your code and the AI tutor open when you unlock this question.