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

Deduplicate - factorial #190

Open
3 tasks done
hobovsky opened this issue Apr 28, 2023 · 7 comments
Open
3 tasks done

Deduplicate - factorial #190

hobovsky opened this issue Apr 28, 2023 · 7 comments
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Apr 28, 2023

From wiki list

  1. Recursion #1 - Factorial
  • 7 kyu
  • Recursion is enforced (reportedly in a bad way)
  • Satisfaction 88% with 8k+ completions
  • 4 pending issues
  • 5 languages + 1 pending translation
  • Published Jan 2016, author inactive
  1. Factorial
  • 7 kyu
  • error should be raised on out-of-range inputs
  • Satisfaction 88% with ~35k completions
  • 2 pending issues
  • 7 languages + 2 pending translations
  • Published Mar 2015, author last active Feb 2023
  1. Factorial
  • 7 kyu
  • Satisfaction 91% with ~20k completions
  • 1 pending issue
  • 19 languages + 6 pending translations
  • Published Aug 2016, author inactive
  1. Factorial Factory
  • 7 kyu
  • Negative inputs expect null
  • Satisfaction 88% with 8.6k completions
  • 1 pending issue
  • 5 languages + 1 pending translation
  • Published Nov 2013, author inactive
  1. Big Factorial
  • 7 kyu
  • Inputs are large and result in large results
  • Satisfaction 90% with 2k completions
  • No pending issues
  • 3 languages + 2 pending translations
  • Published Feb 2015, author inactive
  1. Reverse Factorials
  • 7 kyu
  • Reverse of a factorial function: is it still a duplicate?
  • Satisfaction 91% with 1k completions
  • 3 pending issues
  • 5 languages, no pending translations
  • Published Oct 2016, author inactive
  1. The Non-Discriminate Factorial
  • 6 kyu
  • Extends domain into negative numbers
  • Satisfaction 88% with 903 completions
  • No pending issues
  • 5 languages + 3 pending translations
  • Published Aug 2014, author inactive

Partial conclusion:

I will try to get some more votes for kata 2. and 7. and see what users want to do with them.

@hobovsky hobovsky converted this from a draft issue Apr 28, 2023
@hobovsky
Copy link
Contributor Author

I have no good idea how to pick a candidate to keep:

  • I think kata 1. can go, because restricting solutions to only recursive ones can be problematic in many ways.
  • Kata 2. has potentially interesting aspect of error handling
  • Kata 3. is most complete
  • Kata 4. is the oldest
  • Kata 5. focuses on big integers, and IMO would be one of candidates to keep
  • The task of kata 6. is slightly different than "just factorial"
  • Kata 7. is also slightly different, but I do not know if sufficiently to be kept.

I think kata 5. and 6. can stay as sufficiently different to be kept, especially in languages where bigint types are not the default integer types.
I don;t like code restrictions in general, so I'd vote kata 1. to retire.
From kata 2., 3., and 4. I have no good candidates to keep, but I think one of them should be enough. Maybe 3. as most complete?
I have no opinion on kata 7., I do not know what to do with it.

@hobovsky hobovsky added the discussion/deduplicate Discussion and vote what to do with duplicate kata label Apr 28, 2023
@monadius
Copy link

I vote to keep 3 and 6 only. 6 should be updates to handle large factorials.

I personally don't thinks that large factorials (5) add anything new to this task: There are already many iterative factorial implementations in 3.

7 is a borderline kata. It may stay. But it seems to be overranked and its factorial definition for negative numbers is easy to implement.

@EloiseRosen
Copy link

I like 7! Vote to keep 3, 6, and 7 and retire the others.

@armeanco
Copy link

My vote:
3. Factorial
6. Reverse Factorials

@CiprianAmza
Copy link

Remove 1, 4, 5 as not having enough translations and 7 as being overranked
Keep 2 (error handling seems interesting)
Keep 3 (lots of translations)
Keep 6 (a different way of handling recursive cases)

@hobovsky
Copy link
Contributor Author

hobovsky commented Jun 5, 2023

No one voted to keep 1., 4., or 5., so I think these are good to go.
Kata 3. and 6. are unanimously voted to stay.

I am yet not sure what to do with 2. and 7., let's see if there are any other votes for these two.

@kazk kazk removed their assignment Jun 6, 2023
@4500zenja1
Copy link

I guess 2. may be applicable for those langauges where large numbers aren't supported (not those ones which may have reaaaally big numbers like JS or Python), for C/C++/Java without specialized imports, maybe?

I guess it may stay here, as well as 6. – factorials for negatives are pretty interesting lol. (I wonder if anybody thought about factorials with float arguments – like, 3.14! = 3! + 0.14 * (4! - 3!) = 8.52 or smth like that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata
Projects
Status: Discussing
Development

No branches or pull requests

7 participants