The wavelet tree holds S, all out-neighborhoods concatenated; the bitvector B holds
the out-degrees in unary. Together they answer out- and in-neighbor queries symmetrically.
S, and the bitvector B.out-neighbor: select1(B,v) finds v's block, then read S inside it. in-neighbor: selectu(S,i) finds an edge into u, then B maps that S-position back to its source vertex. degrees are a gap in B (out) or a symbol count in S (in).