Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2775. Undefined to Null
Given a nested JavaScript-like data structure of objects and arrays that may contain undefined values, transform it so every undefined is replaced with null while preserving the original structure and other values. This requires a recursive traversal (distinguishing arrays vs objects) and careful handling to avoid modifying unintended references or mishandling nested collections.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.