Inverse beta loop and PPPSet iteration loop
Add a skeleton for memory optimized algorithm