Rule-Based Graph Programs Matching the Time Complexity of Imperative Algorithms (Logical Methods in Computer Science, 2026)