Search
⌘K

Leetcode 2388. Change Null Values in a Table to the Previous Value

Given an ordered table where some column values are NULL, replace each NULL with the most recent preceding non-NULL value (usually within the same group). This is solved with SQL window functions or correlated subqueries that compute a running "last known" value based on the row order (and handle leading NULLs appropriately).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.