Concat two im_rc::Vector in O(log n) time?

I have

ImVec = im_rc::Vector;;
a: ImVec<T>;
b: ImVec<T>;
output: ImVec<T>; // concat of (a, b)

Is there a way to do this O(log n) time? [Possibly even O(1) time]

Doesn't https://docs.rs/im-rc/13.0.0/im_rc/vector/enum.Vector.html#method.append do it?

2 Likes

I searched for "concat" and "extend", but didn't think to try "append". Good call. Thanks!

Hmm, I just went to the doc page and looked at the sidebar of functions, looked at some, and noticed append. No search-fu involved :slight_smile: