Lyapunov function approach for approximation algorithm design and analysis: with applications in submodular maximization