Time conversion hackerrank solution | hackerrank time conversion solution | time conversion logic

preview_player
Показать описание

Welcome to this beginner-friendly tutorial on the Time conversion problem.

In this video, we solve the classic "Time conversion" problem on HackerRank step by step, explaining key concepts along the way. Whether you're new to programming or just getting started with competitive programming, this video is perfect for you!

If you have any problems with programming then comment down below.

You can follow me on Instagram and LinkedIn
.
.
Also, follow me on HackerRank if you want
.
.
.
#BEAGEEK
#hackerrank
#hackerranksolutions
#hackerranksolution
Time conversion
Hackerrank Time conversion solution
Time conversion solutions
Time conversion hackerrank solution
#competitiveprogramming
#coding
#java
#computerscience
#btech

Time conversion hackerrank solution
Hackerrank Time conversion solution
Hackerrank Time conversion solution in c
Hackerrank Time conversion solution in java
Hackerrank Time conversion solution in python
Hackerrank Time conversion solution in C++
Рекомендации по теме
Комментарии
Автор

This Question was asked In My Interview 👍👍👍👍👍

harshitchauhan
Автор

At 10:19, wont it be s[1] = 9, instead of s[2] = 9 ?
Because the s[2] is the " : " in hh:mm:ss format, and s[1] is the second "h" in hh:mm:ss format.

swastikdey
Автор

string timeConversion(string s) {
string h = s.substr(0, 2);
if(s[8]=='A'){
if(h=="12"){
h="00";
}
}

else{
if(h!="12"){
h=to_string(stoi(h)+12);
}
}
return h + s.substr(2, 6);
}

shatakshijain
Автор

please help me
error: ‘gets’ was not declared in this scope
I face this issue in this program

Legend_deepak
Автор

else if (t[2]=='9')
{
t[0]='2';
t[1]='1';
}
else if (!(t[0]=='1' && t[1]=='2'))
{
t[0]+=1;
t[1]+=2;

}
else if ka error show kar raha please guide kar dain

beefarmchanel
Автор

simple and easy code but, the code is not working for 2 test cases 02:34:50pm and 11:59:59pm..can you please solve this issue!

anushreebk
Автор

bro, i wrote the same code but it didn't pass all test cases can you explain why?

MeTa
Автор

Aag laga di, .
aag ladi,
aag lagadi....

Mumbai aa sakte hoa aab tum 😂😂

yashkashap
join shbcf.ru