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

count inversion.cpp #1865

Closed
wants to merge 1 commit into from
Closed

Conversation

mansikagrawal
Copy link
Contributor

#1664

Fixes #

Checklist:

  • [Done ] 4 space indentation.
  • [ Done] Coding conventions are followed.
  • [ Done] Input is taken dynamically.
  • [ Done] Sample Input / Output is added at the end of file.
  • [ Done] Logic Documentation (Comments).
  • [ Done] File names are correct.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

Changes proposed in this pull request: Added code count inversion.cpp

Languages Used: cpp

Files Added: count inversion.cpp

We're happy to help you get this ready -- don't be afraid to ask for help.

Thanks!

@@ -0,0 +1,106 @@
#include<iostream>
using namespace std;

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mam I couldn't get which line?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Third line

using namespace std;


int mergefn(int arr[],int temp[],int left,int mid,int right)
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep space after comma


int mergefn(int arr[],int temp[],int left,int mid,int right)
{
// temp[] is the auxillary array to store the sorted elements
Copy link
Collaborator

Choose a reason for hiding this comment

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

move this commend before the mergefn() function

Comment on lines +8 to +10



Copy link
Collaborator

Choose a reason for hiding this comment

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

remove these lines

cout<<mergesort(arr,temp,0,n-1)<<endl;
}
return 0;

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this line

return 0;

}

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this line

Comment on lines +50 to +51


Copy link
Collaborator

Choose a reason for hiding this comment

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

remove these two line



}

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this line

@jainaman224
Copy link
Owner

@mansikagrawal Are you working on it?

@mansikagrawal
Copy link
Contributor Author

@jainaman224 yes I am

@mansikagrawal
Copy link
Contributor Author

@asha15 I had made one more pull request regarding this issue please check #2242

@somya-kapoor
Copy link
Collaborator

@mansikagrawal Please close the existing PR if you are creating a new PR regarding the same issue.

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.

4 participants