We introduce an approach for quantum computing in continuous time based on the Lewis-Riesenfeld dynamic invariants. This approach allows, under certain conditions, for the design of quantum algorithms running on a nonadiabatic regime. We show that the relaxation of adiabaticity can be achieved by processing information in the eigenlevels of a time dependent observable, namely, the dynamic invariant operator. Moreover, we derive the conditions for which the computation can be implemented by time independent as well as by adiabatically varying Hamiltonians. We illustrate our results by providing the implementation of both Deutsch-Jozsa and Grover algorithms via dynamic invariants.