Two Pointer Algorithm Python Template Engine Phpvip