Solution of MAXLN and WILLIST