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

Fix compilation error in insertionsort.java #463

Closed
wants to merge 1 commit into from

Conversation

sarah541
Copy link
Contributor

Fixes issue #462

Copy link
Contributor

@christianbender christianbender left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fix! I have two suggestions.

@@ -3,7 +3,7 @@
int n = inputArray.length;

Copy link
Contributor

Choose a reason for hiding this comment

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

Renamed the file into InsertionSort.java. Otherwise you get an compiler error.

@@ -3,7 +3,7 @@
int n = inputArray.length;

Copy link
Contributor

Choose a reason for hiding this comment

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

After the method insertionSort(...) add a main method like:

public static void main(String [] args) {
	int[] liste = {80, 12, 11, -5, 1, 0 , 23, 2, 3, 4, 9};

	// before
	System.out.println(Arrays.toString(liste));

	insertionSort(liste);

	// after
        System.out.println(Arrays.toString(liste));
}

You must import the header:

import java.util.Arrays;

@sarah541
Copy link
Contributor Author

sarah541 commented Oct 4, 2018

Forwarded to #576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants