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 - size of powerset #118

Closed
4 tasks done
hobovsky opened this issue Aug 13, 2022 · 17 comments
Closed
4 tasks done

Deduplicate - size of powerset #118

hobovsky opened this issue Aug 13, 2022 · 17 comments
Assignees
Labels
discussion/deduplicate Discussion and vote what to do with duplicate kata

Comments

@hobovsky
Copy link
Contributor

hobovsky commented Aug 13, 2022

  1. Counting power sets
  • 7 kyu
  • Duplicates should not be removed from the initial set
  • 83% with 5.5k completions
  • 4 pending issues, including bugs related to overflow and missing precision of calculations
  • 9 languages + 2 pending translations. 4 languages and 2 pending translations are not covered by 2.
  • Published Oct 2014, author deleted
  1. Estimating Amounts of Subsets
  • 6kyu
  • Expected answer does not account for an empty set. Duplicates should be removed from the initial set.
  • 88% with 272 completions
  • 2 pending issues
  • 5 languages, no pending translations. Crystal exclusive.
  • Published Dec 2016, author active

Conclusion

Filling gaps

  • Move Java approved translation
  • Move Typescript approved translation
  • Move PHP pending translation
@hobovsky
Copy link
Contributor Author

hobovsky commented Aug 13, 2022

Kata 1. is so bug ridden that there are bugs in its bugs. Precision issues, overflow, bad tests, missing sample tests, and whatnot. Despite possibly not accurate rank of 2., I'd vote to retire 1. just because its sheer technical crappiness. I would not even require to move languages from 1. to 2., they are all so bad.

Kata 2. could be overranked, and also has some technical issues, but if I have to pick, I take anything else than 1.

@hobovsky hobovsky changed the title Deduplicate - powerset Deduplicate - size of powerset Aug 13, 2022
@monadius
Copy link

I agree with hobovsky: 1 should be retired. The pending COBOL translation of 1 may be transferred to 2 but it should be updated to include repeated elements.

@ejini6969
Copy link

Retire 1 since it's unsalvageable

@Blind4Basics
Copy link

remove both?

@Kacarott
Copy link

Retire 1

@KayleighWasTaken
Copy link

KayleighWasTaken commented Aug 14, 2022

In my opinion it's a useful kata to have in some capacity, since it does teach a useful maths concept. As for which one to keep I'd personally vote 1 due to more languages, though it does need a lot of fixing.

If we do retire both then I'm probably going to remake the kata again but in a maintainable state, more likely to the specs of 2 than one.

@EloiseRosen
Copy link

vote for retire 1

@raulbc777
Copy link

Save 2. :) It has an interesting mathematic formula to avoid brute force algorithms. Nevertheless the tests are not so huge to elaborate smart brute force.

@benjaminzwhite
Copy link

Retire 1

@akar-0
Copy link

akar-0 commented Aug 15, 2022

I'm the author of the COBOL pending translation in 1. 2 is not easiy to translate to COBOL because inputs can be either an array of (small) numbers or of characters, it is not possible to do it in this language. If the input is restricted to a known range of small numbers (but the range of the inputs is not specified in the description) or characters, it is significantly easier than it would be otherwise (in the general case, this kata would be significantly harder in COBOL, since there is no equivalent to prebuilt sets in this language). I won't be opposed to retire 1 since it seems a poor quality in the general opinion, but I have no idea of which approach I should follow to translate 2.

@ejini6969
Copy link

I won't be opposed to retire 1 since it seems a poor quality in the general opinion, but I have no idea of which approach I should follow to translate 2.

Maybe we can set inputs of the 2nd one to array of numbers only since the purpose is to find unique entries of the array (plus it will not invalidate most solutions)

@hobovsky
Copy link
Contributor Author

I think that for languages where writing a type-generic code is difficult, like C, COBOL, Pascal, etc. it will be ok to restrict input to only one type, for example ints

@akar-0
Copy link

akar-0 commented Aug 15, 2022

I think that for languages where writing a type-generic code is difficult, like C, COBOL, Pascal, etc. it will be ok to restrict input to only one type, for example ints

It's probably hard to figure it out without knowing COBOL. There are no ints in COBOL, numbers are defined by their number of digits. If I look at the tests in Python, the random arrays have always a size between 15 and 100 (this information would be necessarily provided in set up in COBOL) , and numbers are between -50 and 50 (but this is not specified). With this known information, the task is much more trivial than in a general case (numbers potentially large, that would require to sort the array to count the number of different elements).

I published a COBOL translation there, not sure it is satisfying: https://www.codewars.com/kumite/62fa0d46f96973001229c94b?sel=62fa0d46f96973001229c94b

@raulbc777
Copy link

I approved the COBOL translation made by akar-0 but expecting and watching with you how it behaves.

@fcr--
Copy link

fcr-- commented Aug 20, 2022

Retire 1. I had to provide an incorrect implementation in order to pass the tests in python.

@hobovsky
Copy link
Contributor Author

Kata 1. is voted for retirement, but it has some languages not available in 2. I will create a list of gaps to fill, but if any of translations turns out to be broken, not in a good state to be moved, or difficult to fix, I think we can skip it.

Any volunteers are welcome to verify and move the translations!

@raulbc777
Copy link

I've seen the colors printed in the tests in Python and the red color makes a confusion. Now all the test that passed in Python have the color green. I'll check in JavaScript and Ruby

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
Development

No branches or pull requests