File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/test/java/g0501_0600/s0539_minimum_time_difference Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -33,4 +33,27 @@ void findMinDifference3() {
3333 });
3434 assertThat (new Solution ().findMinDifference (timePoints ), equalTo (0 ));
3535 }
36+
37+ @ Test
38+ void findMinDifference4 () {
39+ List <String > timePoints = new ArrayList <>();
40+ int index = 0 ;
41+ while (index < 301 ) {
42+ int hour = index / 60 % 24 ;
43+ int minute = index % 60 ;
44+ timePoints .add (
45+ String .format (
46+ "%s:%s" ,
47+ hour < 10 ? "0" + hour : hour , minute < 10 ? "0" + minute : minute ));
48+ index ++;
49+ hour = index / 60 % 24 ;
50+ minute = index % 60 ;
51+ timePoints .add (
52+ String .format (
53+ "%s:%s" ,
54+ hour < 10 ? "0" + hour : hour , minute < 10 ? "0" + minute : minute ));
55+ index ++;
56+ }
57+ assertThat (new Solution ().findMinDifference (timePoints ), equalTo (1 ));
58+ }
3659}
You can’t perform that action at this time.
0 commit comments