Find path from A to B which length ≈ L
There are no known efficient algorithms for your problem. Consider the case where every edge has weight&nbsp;$1$ and there are $n$&nbsp;vertices in the graph. A path from $A$ to&nbsp;$B$ with weight (approximately) $n-1$ is (approximately) a Hamiltonian path from $A$ to&nbsp;$B$ and finding Hamiltonian paths is NP-hard.