I have a directed graph, with source and target. every edge is weighted on weight of 1. The nodes have no weight. I need to find an efficient way(I write on C#, but I don't think it is relevant), to find ALL the paths from the source to target, that the weight of the path(or the number of edges , which is the same with those details) be less or equal to a certain value, let's call it K.
A possible way I thought is to run Dijkstra on every value from 1 to K, but since K can be very big it won't be efficient. I have been looking on some answers, but also there was a very similar question to mine, I didn't find this answer as helpfully.