← Goldman Sachs questions
CodingReported in a candidate post, Jul 2025

Left view of a binary tree in O(1) extra space

Filed under Goldman Sachs

Print the left view of a binary tree, the first node visible at each level when looking from the left side. Aim for the most optimal solution: O(n) time and O(1) extra space.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.