Skip to main content

Practice · 4 of 4

CSR Adjacency from Edge List

CHALLENGE
Difficulty: advanced+25 XP

Build compressed sparse rows from an edge array: ``c void csr_build(int V, const int (*edges)[2], size_t E, int *offset, int *adj); ` offset has V+1 entries; adj` has E entries: neighbors grouped by source vertex in increasing vertex order.

Back to lesson: Practice: Data Structure Build Drills