addepar logo
Addepar· SSE Frontend

Addepar 1st Technical Round: SSE Frontend

Experience
5 years
Posted
27 Sept 2026
86 reads

Summary

I interviewed for a Software Engineer Frontend position at Addepar, where I was asked to transform a flat array of objects into a hierarchical tree.

How it went

YOE: 5+

Core Problem: Flat Object Array to Hierarchical TreeProblem Statement:You are given a flat array of objects. Each object represents an entity with a unique id and a parentId. If an entity has a parentId of null or a specific root value, it is a top-level node. Write an optimal algorithm to convert this flat structure into a deeply nested hierarchical tree.

Input: 

[
  {"id": 1, "name": "Portfolio A", "parentId": null},
  {"id": 2, "name": "Equities US", "parentId": 1},
  {"id": 3, "name": "Tech Stocks", "parentId": 2},
  {"id": 4, "name": "Fixed Income", "parentId": 1},
  {"id": 5, "name": "Global Bonds", "parentId": 4}
]



Output:

[
  {
    "id": 1, "name": "Portfolio A", "children": [
      {
        "id": 2, "name": "Equities US", "children": [
          {"id": 3, "name": "Tech Stocks", "children": []}
        ]
      },
      {
        "id": 4, "name": "Fixed Income", "children": [
          {"id": 5, "name": "Global Bonds", "children": []}
        ]
      }
    ]
  }
]

Questions asked (1)

  1. 01

    Convert Flat Object Array to Hierarchical Tree

    Data Structures & Algorithms

    You are given a flat array of objects. Each object has an id, name, and parentId. An object with parentId of null (or a designated root value) is a top‑level node. Build an optimal algorithm to convert this flat structure into a deeply nested hierarchical tree.

    Input Example:

    [
      {"id": 1, "name": "Portfolio A", "parentId": null},
      {"id": 2, "name": "Equities US", "parentId": 1},
      {"id": 3, "name": "Tech Stocks", "parentId": 2},
      {"id": 4, "name": "Fixed Income", "parentId": 1},
      {"id": 5, "name": "Global Bonds", "parentId": 4}
    ]
    

    Output Example:

    [
      {
        "id": 1,
        "name": "Portfolio A",
        "children": [
          {
            "id": 2,
            "name": "Equities US",
            "children": [
              {"id": 3, "name": "Tech Stocks", "children": []}
            ]
          },
          {
            "id": 4,
            "name": "Fixed Income",
            "children": [
              {"id": 5, "name": "Global Bonds", "children": []}
            ]
          }
        ]
      }
    ]
    

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Addepar recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!