Author: Unknown
Subject: Number of Lines in a File in Stats.pl
Date: Saturday, 28 Mar 2020, 16:40:35
It seems like in stats.pl, the number of lines in a file is determined by the number of newline characters. So a file with nine lines of text, but no trailing newline, is treated as 8 lines in the calculations. However, adding a newline at the end of the file causes the file to be treated as 9 lines. If our program sorts under the limit when the file has the newline character at the end (so that the number of lines in the calculation matches up with the number lines of text), should we be worried if our number of pushes/pops is too high when there is no newline at the end?PREV INDEX NEXT