Add solution for #12144 Almost Shortest Path