Even with correct indentation to help us identify the beginning and ending of blocks, if a construct spans across physical pages, it will still be difficult to match the beginning with the end of a construct. Based on this limitation, an algorithm should have no more than 40 lines or so of code. The 40-line limit is based on what most people feel comfortable with respect to font size and display size.
A 40-line algorithm can be quite complex for beginning programmers or even intermediate programmers. In reality, an algorithm should not have more than 20 lines of code if it is intended for beginning programmers.