• ###### Mirioncommented on "Consecutive strings" cpp solution

i write an O(n) solution. you can refer to it

• ###### writeblankspacecommented on "Beginner - Lost Without a Map" python solution

remember that they're not always clean nor efficient!

• ###### vandhana-mohancommented on "Cat and Mouse - Easy Version" javascript solution

if x = '.......c.m', x.length is more than 5 and as per your logic answer is 'Escaped!' while in truth it should be 'Caught!' because the cat can jump upto 3 characters

• ###### uziixvert1commented on "Beginner - Lost Without a Map" python solution

exactly this. why are people using map?

• ###### oleksiiKcommented on "Count the divisors of a number" java solution

Because endExclusive in range excludes the last value

• ###### TachoRamírezcommented on "Beginner - Lost Without a Map" python solution

You´re not setting the values inside an array like in the solution with the [], and the RETURN must be before everything else

• ###### smogcodingcommented on "Beginner - Lost Without a Map" python solution

I was going to use a list comprehension. However, I totally forgot how to do it :(

• ###### Miladepourcommented on "Will there be enough space?" javascript solution

Math.max in the nice solution but how exacly we can reach to this?

• ###### Cplusplusbirdcommented on "Complementary DNA" cpp solution

I think that he just wants to save spaces.

• ###### danieldavcommented on "Complementary DNA" cpp solution

You change initial condition

• from: std::string DNAStrand(const std::string& dna)
• to: std::string DNAStrand(std::string dna)

Thus you made two copies of string, first - when signature passed, second - when return value

``````#include <iostream>

class AAA
{
public:
AAA ( ) {}

AAA ( const AAA& other )
{
std::cout << "copy" << std::endl;
}
} ;

AAA func ( AAA a )
{
return a;
}

int main()
{
AAA _a;
AAA _b = func(_a);
}

Output is:
copy
copy
``````

Therefore it is a BAD practices ...

• ###### BenoitLcommented on "Split The Bill" python solution

Is dict.itervalues, dict.iteritems still working?
I read on stackoverflow that it was used in Python 2 and had been replaced by dict.values, dict.items in Python 3.
https://stackoverflow.com/questions/20444340/iter-values-item-in-dictionary-does-not-work

• ###### CloqueWisecommented on "Beginner - Lost Without a Map" python solution

mine doesnt work but to me it seems like the same thing jsut not linear

for x in a
return x * 2

how is this different?

• ###### luukaundercommented on "Convert a Number to a String!" javascript solution

Didn't even know you could do this.

• ###### Raqunecommented on "Beginner - Lost Without a Map" python solution

I really need to work on my 1 liners... just so clean

• ###### attila_commented on "I love you, a little , a lot, passionately ... not at all" javascript solution

This comment is hidden because it contains spoiler information about the solution