Count how many times “dolphin” appears in a string. Except don’t count the word “dolphin” if it comes immediately after “shark “.
public static int cdol(String str)
Examples:
cdol("dolphin dolphin dolphin")
=> 3cdol("dolphin shark dolphin")
=> 1