| ||A digital clock displays time in the format "DD:DD:DD" (quotes for clarity only), where each D is a single digit, and each pair of contiguous digits represents either the hour, minute, or second (each of these three units will occur exactly once). Unfortunately, we do not know the ordering of the time units, so need to figure out the number of valid ways to interpret the displayed time.|
The hour must be between 01 and 12, inclusive, the minute must be between 00 and 59, inclusive, and the second must be between 00 and 59, inclusive.
For example, "21:23:01" can be intepreted in two ways: "minute:second:hour" or "second:minute:hour".
|Method signature:||int waysToInterpret(String display)|
|(be sure your method is public)|
|-||display will contain exactly 8 characters.|
|-||display will be formatted as "DD:DD:DD" (quotes for clarity only), where each D is a digit ('0'-'9').|
|The example from the problem statement.|
|There are no valid interpretations here because the hour must be at least 01.|
|The four ways to interpret this are: |