Adding floyd algorithm and search from end algo