Codec Fun

Find all distinct path possibilities from php array