Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It would be pointless if you allow the user to use
System.Linq
Where:https://www.codewars.com/kata/reviews/5fafab56e7269b0001519b79/groups/5fafadc6e7e46d00018a1e40
This is a terrible idea. The solution to the task is a very simple math formula which only needs to be slightly golfed to pass the original kata's tests, and any code submitted here is a potential spoiler for it.
More tests needed: negative numbers,
INT_MAX
,INT_MIN
.Comparing numbers is not new.
Fixed tests include only odd inputs, while random tests can generate even numbers as well.
RNG is not seeded.
This kata has no value at all.
By the definition of magic square every number should be distinct. Neither your description, your solution or your test mandates it.
Which means the answer is as trivial as all
0
s withsum
at 4 spots in the square.Please use C++ properly and use
int[4][4]
instead ofint **
as the type. The latter says nothing about the shape.vector<int>
doesn't not denote 16-bit booleans in any sense, it's not booleans and can be in any length. If you want them as an array of bits,std::bitset<16>
should be used instead; and if you want them as a single number,unsigned short
should be used instead.An external link in the description is not a substitute to actual description describing what
NAND
operation is.It's not mentioned where should the result be stored. In one of the input vectors? Or our own?
There's nothing particularly novel or interesting about this kata.
No random tests.
Loading more items...