moved BiDirectionalAlgo to individual directory