Skip to main content

Practice ยท 2 of 3

Critical Chain Length

Requests form a dependency chain: each request may name the request it waited on ("after"). Write chainLength(requests, id) returning how many hops from the initial request to id inclusive. requests is an array of { id, after: null | otherId }. Root requests have after null.

Difficulty: intermediate

Back to lesson: Practice: Waterfall & Blocking โ€” Practice