Cleanup helper functions to validate search results
Created by: dalg24
Please do not get hung up in the details of the helper function to pack/unpack tuples and manipulate compressed sparse row format.
This PR is meant to simplify and unify the comparison of the search with a reference solution.