shad/algo2: refactoring, use std::shared_ptr for Nodes
instead of std::vector indexes.