i have tried implementing the code of this approach but could not build it because i am understanding what to do with nested loops of li lj and bi bj in the starting for top left and bottom right or first four loops .
can someone tell me how can implement those four loops ?