akshitagit / CPP

Repository for C++/C codes and algos.
https://github.com/akshitagupta15june
MIT License
488 stars 433 forks source link

Maximum possible valid time(HH : MM) from the given digits #156

Open pranjalibajpai opened 3 years ago

pranjalibajpai commented 3 years ago

Given four integers - a, b, c, d. Determine the maximum possible time (HH : MM) in 24 hour format that can be formed using the given 4 integers.

Also, print -1 if no valid time is possible with the given set of integers.

Sample Input
a=2
b=6
c=3
d=2
Sample Output 
23 : 26
Sample Input
a=3
b=4
c=5
d=6
Sample Output 
-1
pranjalibajpai commented 3 years ago

Add code in the Interview Questions repo

kashika3101 commented 3 years ago

I would also like to work on it . I would like to work with C++ or Python. Can you please assign it to me? @pranjalibajpai @AkashGit21

Sambhu98 commented 3 years ago

ok I would like to solve this one,can you assign me this one?