Algorithms And Lower Bounds For Ordering Problems On Strings