codewars / content-issues Goto Github PK
View Code? Open in Web Editor NEWHigher level issue tracker for the Codewars content.
Higher level issue tracker for the Codewars content.
Sum of positive
Translation: https://www.codewars.com/kumite/602acdd0641c76001770e3ff?sel=603505c2a86b060027fe9e1e
Clojure
see: https://www.codewars.com/kata/601ae2a5f6d6bb0012947f27/discuss/python#604c72d9754bcc000c52a6da
Approved recently. Currently 6 kyu. 5 would be far more appropriate, imo.
Kata Does the path cross itself? is a copy of 335. Self Crossing from LeetCode. Problem statement is an exact copy, just as examples.
Author: alexbprofit
Unpublished and moved to draft.
Median
Both kata have 6 languages, 7 kyu rank, and poor titles.
Conclusion:
I'm seeing a lot of C++ kata using C's rand
, which should be replaced by std::random_device
and the likes:
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> dis_i(0, 10000);
std::uniform_real_distribution<> dis_d(0.0, 1.0);
int random_int = dis_i(gen);
double random_double = dis_d(gen);
The 6kyu version is off balance, compared to the hard version.
It's too hard to actually be 6kyu (inputs go above 1e7 already), meaning a lot of users just end up with a solution able to pass both versions in the 6 kyu already.
So the 6 isn't different enough from the 4 and is a source of annoyance more than anything (mods needing to hide solutions very often / users expecting something simple but which isn't that easy and lead to more frustrations / monadius explained his 6kyu solution is even more complex to wirte than the 4, to make it different but yet efficient enough / ...)
current outcome of the votes (link to the message on discord):
So the suggestion is to retire the 6 kyu.
discord related thread: Kata Tiral - Find the nth Reverse Number
There's been inconsistency among languages as some languages have arrays of positive integers while some have mix of both positive and negative (C and Java) , which creates confusion on whether the negative sign (-
) should be counted as a digit or not. Two ways to fix it:
PS: R random tests count values one digit short, which needs immediate fix ~~
Kata: Algorithms: Interesting times in Digital Clock display (retired)
Author: dloomb
The kata is already retired, I create the issue just to keep track of it.
Original notice, from internal chat:
Received a first (that I know of) DMCA Takedown from Codility for https://www.codewars.com/kata/58432307cbd22701e3000095/swift
Identification of Infringed Material
The following copyrighted paragraphs have been allegedly copied from the copyrighted work:
Text starting from
"the format "HH:MM:SS""to
""22:22:21", "22:22:22", "22:22:23""I searched it and Codility didn't come up (it's their private challenge), but found https://www.careercup.com/question?id=6199206977994752
Number of inversion
The two kata have different ranks, and maybe this should be considered when voting for one to be kept.
I think the conclusion is quite clear here:
The most obvious "cheat" (here : solving by a means that was not intended) in these katas is that Node 10 or higher is enabled, making the whole kata and its ranking worthless.
Another bug is that construct which one can exploit to run shell commands are not disabled.
For instance : require
in JS
Make a spiral
Translation: https://www.codewars.com/kumite/6022cf7a424423001cb7e574?sel=60350cd550b7dc0017353d84
C#
I've slightly reorganized tests (shuffled, copied sample tests into fixed tests). Looks good to me.
Random Object kata got approved without a proper review, and a bunch of issues was found by FArekkusu afterwards. The kata could be moved back to beta to be properly fixed.
it has been in bad shape for years (with description talking about parentheses, but no tests). Recently updated to add the requirement (which is good), but that makes it pretty close to evaluate math expressions (2 kyu) (iirc, difference is the purple has unary minus in addition).
The 2 kyu is more valuable (diversities/interest of the solutions), so imo, the 3 kyu should be retired.
Author: AlexIsHappy
To solve the kata, it's necessary to have an access to NATO phonetic alphabet dictionary.
There's a series of complaints rolling through the discourse related to the issue.
All available translations should be fixed in a way that:
Another possibility is to provide such dictionary in the solution setup, or in any other way which makes it possible to train on the kata in user's local IDE.
8 approved translations, some pending translations (cannot check how many).
Apparently there are seemingly a lot of katas with this in the Preloaded section:
#include <vector>
using namespace std;
It's an extremely bad idea:
using namespace std
is discouraged anyway for many reasons. In fact it shouldn't even be in initial code, since it's completely optionalvector
/string
it should have the include at the beginning of user codeSo there are basically two lists of katas that need to be updated:
using namespace std;
in Preloadedvector
/string
/whatever but without #include <vector>
/#include <string>
statements (I have no idea how to check all std header imports, but these two seems to be the worst offenders)The Captain's Distance Request
Kata contains a requirement of truncating to full tens as a workaround for comparison with tolerance. Changing assertions to approx. equality should preserve existing solutions, because they should fall into requested tolerance.
Only two affected languages: JS and CoffeeScript. C# translation already has no rounding, and uses assertions with tolerance.
Other reported issues complain on missing sample tests and random tests.
Below are a list of potential duplicate katas that should be tackled upon. I decided to post these here instead of the list so that mods or any PU are not overwhelmed by the amount of content and mixing them up with the older ones which have not been addressed.
If you found any side-note wrong or any broken link, do edit it directly or notify me ~~
Also, if you found any more similar katas, do update it in this list or paste it in a reply ~~
NOTE: this list is not the final conclusion as continuous searching will reveal more similar or exact ones, so feel free to contribute, cheers
Convert time to words (dedicated issue: #48 )
Multiplication table (dedicated issue: #49 )
Number of inversions (dedicated issue: #50 )
Median (dedicated issue: #51 )
Unique Sum (dedicated issue: #56 )
derivative polynomial (dedicated issue: #57 )
Format array into comma separated sentence (dedicated issue: #58 )
valid braces (dedicated issue: #59 )
String contains another substring (dedicated issue: #61 )
count occurrence of a character in string (dedicated issue: #63)
GCD of two numbers (dedicated issue: #64 )
Rock Paper Scissors Lizard Spock (dedicated issue: #66)
vowel / consonant count (dedicated issue: #70 )
sum array (dedicated issue: #73)
Reorder number to maximum (dedicated issue: #79 )
Reverse every word in a string (dedicated issue: #80 )
Generate chessboard (dedicated issue: #82 )
find next perfect square (Dedicated issue: #100)
Finding anagrams of a word (dedicated issue: #101)
Narcissistic number (dedicated issue: #102)
Determine if two strings are isomorphic of each other (dedicated issue: #104)
camelcase (dedicated issue: #107)
String repeat (dedicated issue: #109)
count characters in string (dedicated issue: #110)
Hanoi record (math) (dedicated issue: #111)
acronym (dedicated issue: #112)
Divisibility (dedicated issue: #113)
Palindrome verification (dedicated issue: #114)
counting number of power sets (dedicated issue: #118 )
Check for factor (dedicated issue: #120)
Exponent comparison (dedicated issue: #122)
Palindrome rearrangement (dedicated issue: #124)
Number of permutation without repetition (dedicated issue: #125)
Day of the week (dedicated issue: #126)
Hamming distance (dedicated issue: #129)
Count Words(dedicated issue: #131 )
Nth biggest / smallest numbers (dedicated issue: #132)
Multiple of 3 or 5 (dedicated issue: #133)
Integer depth before all 10 digits have been counted (dedicated issue: #134)
sum of cubes (dedicated issue: #135)
Remove duplicates from list (dedicated issue: #136)
HTML markups (dedicated issue: #137)
Find most occurrence in array (dedicated issue: #138 )
sum of triangular numbers (dedicated issue: #140 )
Array of strings to array of numbers (dedicated issue: #141 )
sum integers in string(dedicated issue: #143 )
Shortest/longest word (dedicated issue: #144 )
partitioning a string to odds & evens indexed (dedicated issue: #146 )
sum of vararg list (dedicated issue: #148)
multiply elements in array(dedicated issue: #155 )
uppercase vowels(dedicated issue: #156 )
Generate array of integers of certain length (dedicated issue: #162 )
check if left side of an array is equal to right side(dedicated issue: #166 )
sort array / string by last character(dedicated issue: #173 )
Specific number of certain days in year or range of years(dedicated issue: #175 )
find pairs(dedicated issue: #179 )
Pad 0 to front(dedicated issue: #181 )
build a tree pattern(dedicated issue: #182 )
IPV4 validator(dedicated issue: #185 )
calculate grade(dedicated issue: #186 )
string unification(dedicated issue: #187 )
Summation (dedicated issue: #188 )
candles distribution (dedicated issue: #191 )
Variable assignment (dedicated issue: #199 )
split string to n parts (dedicated issue: #202 )
lychrel number (dedicated issue: #52)
Factorial length (dedicated issue: #67)
Find first non-repeated characters in the string (dedicated issue: #71)
count ones in binary (dedicated issue: #75)
ATM money counter (dedicated issue: #93)
whether array contains specific value (dedicated issue: #119)
Filter even/odd numbers (dedicated issue: #139 )
sum of digits (dedicated issue: #145 )
Case swapping (dedicated issue: #147)
Vowel remover / converter (dedicated issue: #150)
Number of values required before value overflow (dedicated issue: #151)
get numbers / non-numerics from string (dedicated issue: #154 )
Output n highest value in a list (dedicated issue: #163 )
add spaces between each characters(dedicated issue: #164 )
euclidean distance(dedicated issue: #165 )
Calculation involving n biggest / smallest numbers(dedicated issue: #176 )
sort
disabled, output: difference between 2 biggest numbers)Largest / smallest product of n consecutive numbers (dedicated issue: #177 )
"Number is too small"
)Find missing element(dedicated issue: #184 )
string / number accumulation(dedicated issue: #189 )
Number of days between two dates (dedicated issue: #192 )
year, month, day
, calculate days between given date and today)Password Validation(dedicated issue: #195)
get first character of word (uppercase) (dedicated issue: #196 )
Animals organ count(dedicated issue: #197)
Count connected components (dedicated issue: #200 )
Find elements in an array but not in the other (dedicated issue: #201 )
window sliding (dedicated issue: #208 )
Reverse string or array
pig latin
mean
Find unique numbers
Word length filter
School's locker / door
Make variable equal to two different values
true/false
)2/3
)Formatting numbers
Basic calculator
Levenshtien distance
Uppercase string
Pluck data
implement map
Type of input
Moving zeros to front / end
manipulate parameter based on index
max / min value of array
Time decomposition
hh:mm
)hh:mm:ss
)mixed arrays operation
difference between two arrays
currying
*https://www.codewars.com/kata/547aadd5b84a1fd66800041e (7kyu, 2 languages, same as 3. except require check on second number being missing or not)
*https://www.codewars.com/kata/53a20af2e0afd3e2cd000333 (7kyu, 2 languages, concatenate string)
*https://www.codewars.com/kata/56d344c7fd3a52566700124b (7kyu, 4 languages, add two numbers)
*https://www.codewars.com/kata/functional-addition (7kyu, 10 languages, same as above)
*https://www.codewars.com/kata/55c211cce1ef691d9b000061 (7kyu, JS only, more than two numbers involved)
Addition with limitations
count occurrences of a property in array of dict (Both are the same series)
Change inner words except first & last character
SQL Pivot (Basically the same concept)
modify math.random
Minimum change (more to be added)
Reimplement sort algo
Palindrome builder
Musical transpose
Missing and Duplicate Numbers
Diagonal Matrix
zip
string concatenation / formatting
Capitalize
Alternate capitalization
Flatten
Concatenate array
ascii summation
round to the nearest or next
logical calculations
cascading subsets
credit card checker (luhn algorithm)
nth element
leap year
array to string
string to array
factors of a number
n
is prime if it has no divisors other than 1 and itself)star triangle (missed one kata during deduplication earlier)
Nth root of number
**
, but solutions are still spoiled by above)operations for 2D array
acronym (missed one kata during deduplication earlier)
count number of digit from 1 to N
Evaluate prefix notation
number to word
Sorting strings / arrays
run length encoding
While it's not a PHP issue, the language behaves different than other languages when doing implicit conversion, so when the expected result is a number, and the test suite uses assertEquals, the numbers are converted to booleans instead of the other way around, so with luck, you could pass all tests simply returning true. Sometimes the output of the function is explicitly typed, but removing that from the user's solution, makes this work.
This is a list of katas already fixed (changing assertEquals for assertSame):
https://www.codewars.com/kata/find-the-stray-number
https://www.codewars.com/kata/playing-with-digits
https://www.codewars.com/kata/points-in-the-circle
https://www.codewars.com/kata/smallest-possible-sum
https://www.codewars.com/kata/evaluate-mathematical-expression
https://www.codewars.com/kata/calculate-the-area-of-a-regular-n-sides-polygon-inside-a-circle-of-radius-r
https://www.codewars.com/kata/financing-plan-on-planet-xy140z-n
https://www.codewars.com/kata/number-zoo-patrol
https://www.codewars.com/kata/5a512f6a80eba857280000fc
If you know of any other kata vulnerable to this, just list it in a reply and I'll try to fix it or warn the author/translator to fix it him/herself.
Thanks.
The kata uses "round to 2 decimal places" as a workaround for handling of precision.
Requirement of rounding should be removed and replaced by fuzzy comparison. I think that invalidation of existing solutions should not be a problem in this case, so tolerance can be stricter than 1e-2
.
Currently there's 7 accepted translations and 2 pending ones.
This is a very old kata and it does not meet current standards.
Link: What's wrong with these identifiers?
Issue: Needs actual description (reading discourse, previous one wasn't of any help either).
lychrel number
Creating tests for this problem is tricky (but not difficult), because some seemingly small inputs can cause either infinite sequence (for example, 196), or can lead to numbers which overflow native numeric types.
Convert string to camel case
Translation: https://www.codewars.com/kumite/601fe0c10d5f58000a2c0593?sel=603516c325c0b50018af7cf3
Language: F#
It was mostly good, I removed a tower of language-specific examples from description (I think they are not necessary) and improved assertion messages.
Author: DarkD1
Lots ( < 50 ) of myjinxin2015's kata has broken markdown formatting (like this ), mainly due to ending triple ticks doesn't end at new line (which is syntax error)
Which, as can be seen, makes the whole thing unreadable.
A list collected by @ejini6969 of duplicate kata. The list is to be processed and kata should be either unpublished by a mod, or added to the list of duplicate kata to keep the record.
Format of the list: "duplicate (original)".
As stated here: https://github.com/codewars/codewars.com/wiki/List-of-kata-which-are-potentially-plagiarized-or-copied-from-other-sites-without-proper-credit
Kata Vasya and Drinks:
I see a lot of C++ language versions with functions in initial code that doesn't return anything. Is it good practice? Would it cause UB? Is it even legal C++?
https://www.codewars.com/kata/556b4fdfc0f8bbbd2d000019/discuss/javascript
I vote for retirement
Author: arhigod
Currently 6 kyu. Should be 5
While searching for something I could solve, I stumbled upon three kata related to N queens problem. Initially I thought they are either bad quality, or duplicates, and should be retired, and even created an entry here. However after thinking a bit I think they can be turned into some interesting stuff. Thing is that all of them are in beta, have some issues, and sit there even since 2014, while not being terribly broken, possible to fix, and with some fun potential. What's interesting, there's no similar kata which would be accepted - or at least I could not find any. I would be willing to hijack, fix and out-beta them, however I would like to hear some advice or opinion on how to approach it. The existing beta kata are:
O(n)
generators for such solutions, I'd go with some high N (like, for example, 200). It would make hardcoding somewhat infeasible. I'd rank it as 6 or lowish 5 kyu and translate it to my languages.-O2
code just crawls while it runs much, much, much faster when optimizations are enabled. Without -O2
, it's difficult to estimate good range for size and amount of tests, but I'd expect them to be at least doubled in terms of N and amount of test cases. There's also quite a lot of material available online to hint some ways to solve it (mostly scientific papers and not direct implementations), so I think that current rank of 1 kyu is too much.-O2
is a real PITA here.Of course it's just an idea and if you think it's bad, let me know how you'd approach it. Maybe retire all except one? Or my difficulty rankings are off? Remember that kata would still be the subject to beta evaluation, so no change is final. Or maybe I should just save my time and let them rot in beta forever?
Thanks
This kata is a duplicate and its author provided a translation to the original one, so now it can be unpublished.
I asked the author to do so (they are active right now), but if they don't do it soon, a mod would have to handle this.
Both are ranked 6 kyu and have similar satisfaction rating of ~90%.
Retire one? Both? None?
Any improvements needed in the one(s) to be kept?
Conclusion:
https://www.codewars.com/kata/5703bd0b022cd12bcd0011fb/discuss/javascript
let's just unpublish it?
(actually, it might be a good addition to the series.... Not sure... Opinions?)
https://www.codewars.com/kata/5f120a13e63b6a0016f1c9d5
having this at 7 kyu is just a joke. Should be 6.
DISCLAIMER
I realize that duplicated katas are general problem on CW, which should be addressed as a whole. But since there is no technical means for that and there is no agreement how to do it, I just want to propose the other way: let's do it slowly, gradually, a kata by kata. I want this thread to be related to this particular set of katas mentioned below, and not a general problem. If we find a good solution for one instance of the problem, maybe then we will know how to resolve other ones too.
While hunting for challenging blue/easy purple katas to solve, I encountered following:
I solved four of them with almost the same code, just with minor adjustments and/or translating from one language to another (I skipped the yellow and the beta ones). Each of these katas has also its own set of issues, like:
eval
.I have two proposals how this could be fixed, however it cannot be done by any regular user or power user and requires attention of a powerer-user or admin:
Easy fix: leave two (easier and more difficult) as they are, and retire the others. My picks would go to (1.) and (5.) as their rank fits the difficulty better than in case of others. This way no one needs to edit anything, no one looses any points, only the authors of retired katas are less exposed and potentially lose opportunity of future solutions (not a big loss for the site, if you ask me). But still, we are left with not-that-perfect (albeit quite good, I'd say) katas and can use regular means of fixing them (fork/edit/republish/invalidate solutions/repeat).
More challenging fix: Retire all and send them into oblivion. Provide two new katas with two levels of difficulty: 5 kyu for BEDMAS and no error handling, and 3 (maybe 2?) kyu for additional error handling and functions (but not only unary ones, but also binary, ternary, and variadic, for example avg(32, 8+9, 15, (2+2)*2)
, maybe performance test, and all common issues addressed (external eval, error handling with exceptions/return values, random tests, etc). Clearly state in the description that they are deduplicates of other katas. Keep an eye on new betas and slap everyone who submits a duplicate (three slaps for anyone who approves it). If you consider it's too much work, I volunteer to create new katas and translations.
Potential follow up: obliterate (6.)
NOTE: I want this thread to become some kind of beta drive or template for "community driven deduplication process", where others can search for more duplicates, cast ideas for what should stay, what should be gone, and what/how should be fixed. @Voileexperiments already created really nice and terribly long list here: codewars/codewars.com#1315 and I think CW really needs some way to handle such problems. If community will like it, we can go with other duplicates similar way. Maybe we will even get a dedicated board for "kata related issues" :) If you do not like the idea or do not think there is any feasible solution for duplicates (for example, for some reason katas cannot be retired "just like that"), then ok - just close this thread and I promise not to create "my new, great, bright idea" suggestions anymore :)
The description was from Codility and was removed immediately when we received a DMCA takedown notice. Created by dloomb.
Note: description is copied almost verbatim from original source, but it's not themed and described in a very generic, "mathy" way, so maybe retirement would be just a last resort action.
Note: description is copied almost exactly from the original site, but it's somewhat neutral and does not seem to use "propertiary" theme, so maybe retirement would be a last resort action.
Odd or Even?
Translation: https://www.codewars.com/kumite/5fb425b428552b000d795447?sel=5ff73bd913208a002604a0dd
C++
It was OK, but by accident I published another fork and now I cannot approve it :/ So I went further and also made examples neutral.
Would it be possible to move this kata back to beta?
It's quite an old one, but I cannot tell when it got approved. It managed to collect three issues in a short time, and has not many completions ( < 40).
Basics 07: Calculate Sin(x) - too easy?
Needs to be updated to C# 8.
Hide solutions which are valid
Apparently, mods can do this.
Compiler to Lambda Calculus has a single user solution, by a cheater, which is an exact copy of my own solution ( but for a single comment ).
I was delighted to see I had a user solution. ๐ Then I discovered it was a cheat ( and solver was already banned ). ๐ง
Every time I see it it breaks my heart. That kata is a labour of love I don't really expect any solutions on anymore anyway.
Can someone nuke that solution? From orbit? Just so I don't have to see it? If I don't have to look at the "Total times this kata has been completed: 2" either, that would be even greater ( but I can understand that might require completely removing the solution, which maybe can't be done ).
( If this is asking too much, for too little gain, please just close this issue. )
This Kata does not comply with codewars authoring guidelines because:
This Kata lacks novelty and is hardly interesting even for a beginner
Three very similar kata:
Author: myjinxin2015
Note: In order to view the problem on codesignal you've to register on the website.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.