Three-step iterative weight function scheme with memory for solving nonlinear problems