Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a new program to convert 12 hour time format to 24 hour time format #1979

Closed
wants to merge 3 commits into from

Conversation

@hrithik-13
Copy link

@hrithik-13 hrithik-13 commented Oct 28, 2020

added a new program to convert 12 hour time format to 24 hour time format

hrithik-13 added 3 commits Oct 28, 2020
Faster way to check whether a string is palindrome or not
Conversion of 12 hr time format  to 24 hr time format
added a program to find Binomial Coefficient of two given numbers
@TravisBuddy
Copy link

@TravisBuddy TravisBuddy commented Oct 28, 2020

Travis tests have failed

Hey @hrithik-13,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 46d3b0e0-1962-11eb-a6ec-b9eb403ed3be

// Pointers pointing to the beginning
// and the end of the string
int i = 0, j = str.length() - 1;

This comment has been minimized.

@AkMo3

AkMo3 Oct 29, 2020

Make variable name a little bit more understandable like
int startIndex =0, endIndex = str.length()-1;

import java.util.Scanner;

public class Solution {

This comment has been minimized.

@AkMo3

AkMo3 Oct 29, 2020

Add javadocs comments explaining different parameters. Follow the correct coding guidelines with proper description of the methods. Refer to DecimalToAnyBase.java and DecimalToAnyBaseTest.java for the algorithms and tests coding standards, respectively.


public static void main(String[] args) throws IOException {

Scanner in = new Scanner(System.in);

This comment has been minimized.

@AkMo3

AkMo3 Oct 29, 2020

Try to implement try catch with Scanner class.

hour =""+h;
}
System.out.println(hour+":"+min+":"+seconds);
}

This comment has been minimized.

@AkMo3

AkMo3 Oct 29, 2020

Close scanner class to prevent resource leak.
in.close()

@TravisBuddy
Copy link

@TravisBuddy TravisBuddy commented Oct 29, 2020

Travis tests have failed

Hey @hrithik-13,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 0e782430-19e2-11eb-a6ec-b9eb403ed3be
@hrithik-13 hrithik-13 closed this Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.