Linear-Time Algorithms For Edge-Based Problems