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 Insertion Sort in Java #1608

Merged
merged 12 commits into from
Oct 15, 2019

Conversation

raj808569
Copy link
Contributor

Congrats on taking the first step to contributing to the Sample Programs repository maintained by [The Renegade Coder][1]! For simplicity, please make sure that your pull request includes one and only one contribution.

Complete the Applicable Sections Below

Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.

Code Snippets

  • I named the pull request using Added/Updated <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut, developer, typing, etc.)
    • I added reference link(s) to the README
    • I added solution citations when necessary (see [plagiarism][2])

Documentation

  • I named the pull request using Added/Updated <Sample Program> in <Language> Article format
  • I followed the applicable article template
    • I added/updated a [language article][4] (i.e. The Python Programming Language)
    • I added/updated a [code snippet article][3] (i.e. Hello World in Perl)
    • I added/updated a [project article][5] (i.e. Fizz Buzz in Every Language)

Testing

  • I named the pull request using Added/Updated <Language>/<Project> Testing format
  • I followed the testinfo template, if applicable

Notes

Added Insertion Sort in Java #1362 and updated the Java README.md

@jrg94 jrg94 requested a review from a team October 14, 2019 19:22
@jrg94 jrg94 self-assigned this Oct 14, 2019
@jrg94 jrg94 added enhancement Any code that improves the repo hacktoberfest Hacktoberfest related insertion sort See: https://sampleprograms.io/projects/insertion-sort/ labels Oct 14, 2019
@jrg94 jrg94 added this to the 500 Code Snippets milestone Oct 14, 2019
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this might be failing some tests. Take a look.

}

if(numList.size()<2) { // wrong/invalid input format
System.out.println("Usage: please provide a list of at least two integers to sort in the format “1, 2, 3, 4, 5”");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
System.out.println("Usage: please provide a list of at least two integers to sort in the format 1, 2, 3, 4, 5");
System.out.println("Usage: please provide a list of at least two integers to sort in the format \"1, 2, 3, 4, 5\"");

@raj808569 raj808569 requested a review from jrg94 October 15, 2019 06:46
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runs great!

@jrg94 jrg94 merged commit 8e2978b into TheRenegadeCoder:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any code that improves the repo hacktoberfest Hacktoberfest related insertion sort See: https://sampleprograms.io/projects/insertion-sort/
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add Insertion Sort in Java
2 participants