Optimised no. of recursive calls by preventing calls when unprocessed string is of 0 length