Up and left direction approach

What changes do I have to make in the previous approach to apply up and left direction also?