java pattern matching 16

Solutions on MaxInterview for java pattern matching 16 by the best coders in the world