id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

dateTime_compareTimes


Given two integer arrays named "timeA" and "timeB" that hold integers for hours, minutes, and seconds, return "a" if timeA is earlier in the day, return "b" if timeB is earlier, and return "same" if they are the same time.


dateTime_compareTimes([12, 0, 0], [12, 0, 0]) → "same"
dateTime_compareTimes([12, 0, 0], [13, 0, 0]) → "a"
dateTime_compareTimes([12, 0, 0], [11, 0, 0]) → "b"

...Save, Compile, Run (ctrl-enter)

public String dateTime_compareTimes(int[] timeA, int[] timeB) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy