Senior Front End Engineer Interview Questions

2,000 senior front end engineer interview questions shared by candidates

Aggregate data grouped by label - Your task is to fetch a list of conference rooms and label hierarchy and to display in a graph the total capacity of all conference rooms by label. 1. Fetch data You are given 2 API endpoints to use: getConferenceRooms Fetch a list of all conference rooms (no arguments) - returns a Promise that resolves into a list of conference room objects. Sample response: [ { "id": 1, "name": "Strawberry", "buildingName": "KennedyA", "labels": [4, 1], "capacity": 40, "hasProjector": true, "hasTv": true }, ... ] getLabels Fetch a list of all available labels (no arguments) - returns a Promise that resolves into a list of label objects. Sample response: [ { "id": 1, "name": "Large", "parentId": null }, ... ] 2. Calculate Total Capacity by Label Each conference room has a capacity: Number attribute and an optional list of labels?: Array representing IDs of the labels assigned to the room. Each Label has a name: String and an optional parentId: Number . Labels have hierarchy - A label is a child of another label if the other label has parentId that matches its id. Labels hierarchy is recursive - a label's descendants are its children, and all of their children recursively. Rooms are associated with a label if room.labels has the label or any of its descendants. The total capacity for a label is the sum of the capacity of all rooms associated with the label. 3. Display a Graph You are provided with a BarGraph component: Use it to display the graph of Total Capacity by Label as pictured above. 4. Filter the data You are provided with a Select component: Use it to select the labels to show in the graph. When no labels are selected show all labels in the graph.
avatar

Senior Front End Developer

Interviewed at Claroty

4.1
Feb 14, 2024

Aggregate data grouped by label - Your task is to fetch a list of conference rooms and label hierarchy and to display in a graph the total capacity of all conference rooms by label. 1. Fetch data You are given 2 API endpoints to use: getConferenceRooms Fetch a list of all conference rooms (no arguments) - returns a Promise that resolves into a list of conference room objects. Sample response: [ { "id": 1, "name": "Strawberry", "buildingName": "KennedyA", "labels": [4, 1], "capacity": 40, "hasProjector": true, "hasTv": true }, ... ] getLabels Fetch a list of all available labels (no arguments) - returns a Promise that resolves into a list of label objects. Sample response: [ { "id": 1, "name": "Large", "parentId": null }, ... ] 2. Calculate Total Capacity by Label Each conference room has a capacity: Number attribute and an optional list of labels?: Array representing IDs of the labels assigned to the room. Each Label has a name: String and an optional parentId: Number . Labels have hierarchy - A label is a child of another label if the other label has parentId that matches its id. Labels hierarchy is recursive - a label's descendants are its children, and all of their children recursively. Rooms are associated with a label if room.labels has the label or any of its descendants. The total capacity for a label is the sum of the capacity of all rooms associated with the label. 3. Display a Graph You are provided with a BarGraph component: Use it to display the graph of Total Capacity by Label as pictured above. 4. Filter the data You are provided with a Select component: Use it to select the labels to show in the graph. When no labels are selected show all labels in the graph.

Viewing 1961 - 1970 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 2,000 interview questions and reports from Senior front end engineer interviews. Prepare for your interview. Get hired. Love your job.