Deutsch's algorithm determines if the given function is constant or balanced. We generalize Deutsch's algorithm based on the method proposed in Nagata and Nakamura (Int. J. Theor. Phys.59, 611,2020). Generalized Deutsch's algorithm determines all the mappings of the given function.