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.
good for you man, im still timing out from using the backtracking approach :(
EDIT: I'm sorry, i used some code on github for the solution. Before anyone says anything, I probably shouldn't have done that, however I have spent some time reading the code, and I can fully understand it now. I think the point of codewars is to learn, but sometimes give up if it is too difficult. And for the reason why I did that, well, it's late now, so I got frustrated and just copy pasted some code off the internet.
This comment is hidden because it contains spoiler information about the solution
Yes. I find this much clearer and easier to understand.
Maybe also change the beginning of the first sentence of the Task description in:
Find all integers
k
betweenm
andn
...Here are my notes about making it more clear
A "command" 0<=cmd<=UINT_MAX is obfuscatedly associated with one of 5 functions f_A(x)
where 'A' (the "action") is the function's label and takes the values 0<=A<=4
After training you should be able to undo the obfuscation
to determine which action (which function f_A) is referred to by cmd
The function get_action(action)(x) evaluates the function f_action(x).
In order to determine if you have the correct function picked out,
you have to guess an action 'a', calculate sample outputs y=f_a(x) using command(cmd, x),
and using response(y==Y) you can update your guess of 'a' depending on whether or not
the output y corresponds with the true output Y=f_A(x) for all inputs x
I don't think so.
Just like you I would have to understand it from scratch. ('coz I don't remember it at all)
So, please, try to do it yourself!
Feel free to message me back if problems occurred
Good luck =)
No, there're
9
non-zero bits both inn
andexpected
. Not an issue.Thank you so much! I was getting errors about that and did not understand the criteria that was being followed
Thanks a lot man! You saved me a lot of headaches. I thought I'm the only who thinks that the instruction lacks crucial details.
This comment is hidden because it contains spoiler information about the solution