Skip to content

Fix: Segmentation fault in merge_sort.c and print message #1243

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

Merged
merged 8 commits into from
Apr 9, 2023

Conversation

PKGzGMTH
Copy link
Contributor

Description of Change

  • Fix: Segmentation fault in merge_sort.c
  • Feat: Print message of input and output.

Checklist

  • Added description of change
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

  • Handle error if array can't malloc.
  • Exit program if array size is not greater than 0.

Copy link
Collaborator

@CascadingCascade CascadingCascade left a comment

Choose a reason for hiding this comment

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

TBH, I'm not exact sure why the original author chose to use dynamic storage allocation, if we are really dealing with arrays that big we wouldn't enter all the data by hand would we?

@Panquesito7 Panquesito7 added the bugfix Correction to existing algorithms label Mar 31, 2023
Copy link
Collaborator

@CascadingCascade CascadingCascade left a comment

Choose a reason for hiding this comment

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

Looks good enough to me

Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks! 🚀

@Panquesito7 Panquesito7 requested review from CascadingCascade and alexpantyukhin and removed request for CascadingCascade April 7, 2023 18:38
Copy link
Member

@alexpantyukhin alexpantyukhin left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Panquesito7 Panquesito7 merged commit 2698ad2 into TheAlgorithms:master Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Correction to existing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants