Tap here to switch tabs
Problem
Submissions

Problem: Number of Elapsed Seconds Between Two Times

Try to solve the Number of Elapsed Seconds Between Two Times problem.

Statement

You are given two strings startTime and endTime representing two valid timestamps on the same day in the format "HH:MM:SS".

Return the total number of elapsed seconds from startTime to endTime.

Constraints:

  • startTime.length =8= 8

  • endTime.length =8= 8

  • startTime and endTime are valid times in the format "HH:MM:SS"

  • 00≤extHH≤2300 \leq ext{HH} \leq 23

  • 00≤extMM≤5900 \leq ext{MM} \leq 59

  • 00≤extSS≤5900 \leq ext{SS} \leq 59

  • endTime is not earlier than startTime

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Number of Elapsed Seconds Between Two Times

Try to solve the Number of Elapsed Seconds Between Two Times problem.

Statement

You are given two strings startTime and endTime representing two valid timestamps on the same day in the format "HH:MM:SS".

Return the total number of elapsed seconds from startTime to endTime.

Constraints:

  • startTime.length =8= 8

  • endTime.length =8= 8

  • startTime and endTime are valid times in the format "HH:MM:SS"

  • 00≤extHH≤2300 \leq ext{HH} \leq 23

  • 00≤extMM≤5900 \leq ext{MM} \leq 59

  • 00≤extSS≤5900 \leq ext{SS} \leq 59

  • endTime is not earlier than startTime