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

Marc's cakewalk problem:C# solution #183

Merged
merged 2 commits into from
Jul 13, 2018
Merged

Conversation

rasik210
Copy link
Contributor

Added a new solution for Marc's cakewalk 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 marc's cakewalk problem using C# programming language
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

@RyanFehr
Copy link
Owner

When reviewing this solution I realized that the n log n solution may actually be more efficient than the n+k solution for large k values, so I am going to review this and make adjustments as needed

@rasik210
Copy link
Contributor Author

I went back to my submissions on hackerrank and I can see that the first submission that I made which passed all test cases was done using quick sort only. So it was n log(n). Later, when I came to submit it in your repository then I could see that you used counting sort instead. Although, it is hard for me to imagine that O(n log(n)) will be better than O(n+k). k (=1000) is a constant in this case no matter how big n becomes. Isn't it?

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