What are some recommendations to solving code coach challenges? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What are some recommendations to solving code coach challenges?

I'm trying to solve these code coach challenges with c++, but not all the test cases work for some reason. For example, the Halloween Candy is an easy challenge, and I know that what I implemented in the program was suppose to run correctly. I know there's more than one way to some a problem, but is there a specific component of code that these challenges require me to include? (PLEASE DO NOT POST ANY CODE BECAUSE I DON'T THINK SOLOLEARN WILL ALLOW THIS, JUST RECOMMENDATIONS.)

27th Jun 2020, 12:56 AM
Seth Moga
Seth Moga - avatar
2 Answers
+ 3
Seth Moga For halloween you have to use "ceil()". To get nearest integer... :)
27th Jun 2020, 1:03 AM
Indira
Indira - avatar
+ 2
if your code doesn’t run on all test cases, then your code is wrong. consider corner cases, out of bound index, type oveflow, etc. you must make your program as robust as possible “what I implemented in the program was suppose to run correctly” yeah that’s what every programmer thinks
27th Jun 2020, 11:02 AM
Bobby Fischer
Bobby Fischer - avatar