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

 

dateTime_compareDates


Given two integer arrays named "dateA" and "dateB" that hold integers for years, months, and days, return "a" if dateA comes before dateB, return "b" if dateB comes before dateA, and return "same" if they are the same date.


dateTime_compareDates([2022, 1, 1], [2022, 1, 2]) → "a"
dateTime_compareDates([2022, 1, 2], [2022, 1, 1]) → "b"
dateTime_compareDates([2022, 1, 1], [2023, 1, 1]) → "a"

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

public String dateTime_compareDates(int[] dateA, int[] dateB) { }

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