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

min absolute diff in an array problem: C# solution #168

Merged
merged 2 commits into from
Jun 20, 2018

Conversation

rasik210
Copy link
Contributor

Added a new solution for minimum absolute difference in an array problem using C# programming language.

rasik210 added 2 commits May 29, 2018 16:16
Syncing original repository changes into the fork - 29 May
Added a new solution for minimum absolute difference in an array problem using C# programming language.
@rasik210
Copy link
Contributor Author

Hi @RyanFehr

We require a discussion regarding space complexity of this problem. I've changed it to O(n) as we need to store the entire input in memory to perform sorting on it. I believe you're also doing the same in below mentioned line of code in the Java solution:

int[] a = new int[n];

Kindly evaluate it. For now I've changed the space complexity in readme file.

Copy link
Owner

@RyanFehr RyanFehr left a comment

Choose a reason for hiding this comment

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

  • Solution passes all test cases
  • Time and space complexity are correct
  • Header is formatted properly
  • Problem has been added to README and formatted properly

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.

2 participants