added comments on computational complexity

also eliminated an unneeded strlen.