Parse a Nested-List String and Compute Its Weighted Sum

Read the full interview experience this question came from →

Quick Overview

Parse a valid nested-list string and return the depth-weighted sum of its non-negative integers. Track bracket depth and multi-digit number boundaries correctly, including empty lists, spaces, and a final number.

Parse a Nested-List String and Compute Its Weighted Sum

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Parse a valid nested-list string and return the depth-weighted sum of its non-negative integers. Track bracket depth and multi-digit number boundaries correctly, including empty lists, spaces, and a final number.

Read the full Google Software Engineer interview experience this question came from

|Home/Coding & Algorithms/Google
Google logo
Google
Aug 6, 2026
mediumSoftware EngineerOnsiteCoding & Algorithms
9
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...