I have a dataset of start/stop times, with each start/stop time on a separate row. I need to associate each starttime with its corresponding stoptime. The basic algorithm is