That was interesting. I suppose its an iq test more than coding problem. When these pshysics concept even obvious ones are presented in a coding contexts, they could be very puzzling becuase the brain used to work in specific manner in this environment. Some times these kinds of distractions can be helpful to give our brains, alternative signals.
that was hilarious!
The elements you used would be cost.
Remember to subtract them.
This is not an issue! Your algorithm might need a fix. Please post it under questions tag to get help
This comment is hidden because it contains spoiler information about the solution
Perhaps a part 2 should be made where we need to return all the options of the mix:
was a fun Kata:P
I came for an answer, I am leaving with a life lesson
It works now, thanks.
I fixed it, CH4 was formed with 2 H atoms in the Haxe trans. which is wrong. I changed the code, try it now!
Is the Haxe algorithm working the same way as the others?
I get this error from time to time in the random tests:
expected array element at  to have 182 but it is 91 for field array -> it expects double the amount of ch4, but not always.
I added it either way!!
Java translation. This is my first translation, so I encourage and seek constructive criticism.