Sample-Efficient Nonconvex Optimization Algorithms In Machine Learning And Reinforcement Learning