Floyd Algorithm using Recursive method Recursive method is the most preffered method of representing Floyd Algorithm since its functions can be called over and over again until the required condition is met. The Floyd Algorthim code below is represented in recursive way as the most efficient way.