<

Time Conversion - Hackerrank Algorithm Live Solution Using C++

Posted on
9,042 Points
42 Views
Last Modified:
Published
Experience Level: Beginner
27:49
Subrat (C++ windows/Linux)
Provide training in Advanced C++ and working as a software Engineer since 2003
Prepare->Algorithms->WarmupTime->Conversion
Given a time in -hour AM/PM format, convert it to military (24-hour) time.

First, try to solve it yourself and then come back to check the solution.

Question Link: https://www.hackerrank.com/challenges/time-conversion/problem?isFullScreen=true

What You SHOULD KNOW:

  1. std::string
  2. std::stringstream
  3. std::setw(2)
  4. std::setfill('0')

 GitHub Link: https://github.com/subrat80/hacker-rank-algo/blob/main/30-timeConversion.cpp
0
0 Comments
The greatest common divisor (gcd) of two positive integers is their largest common divisor. Let's consider two numbers 12 and 20. The divisors of 12 are 1, 2, 3, 4, 6, 12 The divisors of 20 are 1, 2, 4, 5, 10 20 The highest number among the c…
Iteration: Iteration is repetition of a process. A student who goes to school repeats the process of going to school everyday until graduation. We go to grocery store at least once or twice a month to buy products. We repeat this process every mont…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month