We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Time Conversion
- Discussions
Time Conversion
Time Conversion
Sort by
recency
|
331 Discussions
|
Please Login in order to post a comment
Scala
It is unfortunate that HackerRank's supposedly C++20 environment is actually a C++17 environment.
std::format
would have been handy.Pretty simple javascript solution. Just splitting the time into hours, mins and secs, checking if it's am or pm and adjusting the hours as needed, then rejoining
Java:
public static String timeConversion(String str) {