Flood defence systems can be seen as multiple interdependent flood defences. This paper advances an approach for finding an optimal configuration for flood defence systems based on an economic cost-benefit analysis with an arbitrary number of interdependent flood defences. The proposed approach is based on a graph algorithm and is, thanks to some beneficial properties of the application, able to represent large graphs with strongly reduced memory requirements. Furthermore, computational efficiency is achieved by delaying cost calculations until they are actually needed by the graph algorithm. This significantly reduces the required number of computationally expensive flood risk calculations. In this paper, we conduct a number of case studies to compare the optimal paths found by the proposed approach with the results of competing methods that generate identical results. The proposed approach is set up in a generic way and implements the shortest-path approach for optimising cost-benefit analyses of interdependent flood defences with computationally expensive flood risk calculations.