Is z happy in the string: True ( 'z' is happy when there is another 'z' immediately to its left or right ) “azzlea” another 'z' in its right “ a z z l e a ” Checking for z is happy or not Is z happy in the string: False ( 'z' is happy when there is another 'z' immediately to its left or right ) “azmzlea” “azmzlea” Checking for z is happy or not 'z' is not immediately left or right of another z w3resource.com