Text this: Rule-Based Graph Programs Matching the Time Complexity of Imperative Algorithms