Text this: Algorithms for Computing Wiener Indices of Acyclic and Unicyclic Graphs