Transform a flat array of objects into a nested list. | New York Times Interview Question | Practice Free | SkillVee