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 - prefix sum #189

Open
hobovsky opened this issue Apr 27, 2023 · 4 comments
Open

Deduplicate - prefix sum #189

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

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Apr 27, 2023

From #39

  1. Running out of space
  • 7kyu
  • Input is a list of strings, output is cumulative concatenated string
  • Satisfaction 91% with 4.3k completions
  • 1 pending issue
  • 4 languages + 1 pending translation (C++ exclusive)
  • Published Nov 2015, author inactive
  1. Number to digit tiers
  • 7kyu
  • Input is a stringified number, output is a cumulative concatenated string
  • Satisfaction 92% with ~2.8k completions
  • No pending issues
  • 6 languages + 2 pending translations
  • Published Jan 2017, author inactive
  1. Sum it continuously
  • 7kyu
  • Input is a list of numbers, output is a cumulative sum
  • Satisfaction 90% with 762 completions
  • 1 pending issue
  • 4 languages (Nim exclusive)
  • Published Sep 2017, author active
@hobovsky hobovsky converted this from a draft issue Apr 27, 2023
@hobovsky hobovsky added the discussion/deduplicate Discussion and vote what to do with duplicate kata label Apr 27, 2023
@hobovsky
Copy link
Contributor Author

I used almost identical solutions to solve all three kata, but maybe the string vs int input is different enough? I don't know, and I have no good candidate(s) to keep. Any suggestions?

@monadius
Copy link

monadius commented Apr 28, 2023

3 asks to compute prefix sums of integers. It is a classical exercise. I am surprised that there are no other duplicates of this task. If it is not an identical duplicate of some other kata, then we should keep it.

1 is a variation of prefix sums with strings. It is not a big difference for languages like Python or JavaScript. But it can be more tricky in C or even Java (by the way its Java translation is broken). So we may keep it also.

2 can be solved in exactly the same way as 1 (with an additional number to string conversion). But it also allows simpler solutions with slices. I don't think that this kata adds anything new to the other two katas. So it can be retired.

@dramforever
Copy link

I think 2 allows a good variation of solutions, like slicing or dividing by 10 on the number instead.

I agree with monadius said above about 1 and 3.

I wouldn't consider these 3 duplicates. I'd say keep all.

@CiprianAmza
Copy link

I would say to keep all 3 (3 is basic accumulate exercise and I don't consider it a duplicate). 1 and 2 have a similar idea, but I don't think they are duplicates.

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

4 participants