shortestNonEmpty and getMaxLengthWord are passing tests