LeifTerry : Thank you very much, I was still thinking, reading the thread but found no idea to solve my problem. With your hint I pass 3 more tests (the 6 firsts) and time out for the 3 others. I’m very surprised about that difference between == and .equals()
OK I passed all tests and validators with no efficiency enhancing at all. The last problem was a debug code that increased time. Once I deleted this code, I passed everything. (JAVA)
I think this puzzle should be at difficulty medium. I wasn’t able to pass all test without using maps. But maybe it’s due to the fact that i’m kind of new to c++. But still, it seems a hard for an “easy” puzzle. Take me few hours when I expected to finish in one.
Hi there! I spent a few hours on this test and I don’t understand why I fail on validator 3 (the others are successful)
I’ve rewritten my code several times and read the different tips but I can’t find the solution.
Could someone help me understand what type of test is missing for validator 3 please?
I got time out for 7 and 8. The helpful hint is the == comparison sign. Printed out the time taken to compare, and oh my, I now know why it took so long.
Hi guys! I was having trouble with the high density problems, these were the methods:
At first I was creating a list of all the possible rectangles coordinates like “(0,0) (0,1) (1,1) (1,0)” and then comparing the sizes of each rectangle edge, if the edges had equal size, it was a match. This method took 5+ minutes to solve.
The second method I used was: instead of compairing the coordinates values, I could actually store all the edge sizes in a list, and then compare all the edge sides, one by one. This one, reduced the time to 21 seconds, but it’s still not enought to pass high density cases.
The third method, and the one that solved in less than 1sec, is based in the use dictionaries to optmize the comparison of the lenghts that match in x and y. I hope it helps!