Talk:Straddling checkerboard: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 40:
 
::: Sorry. I completely forgot that I said I'd make those changes. Yeah, I think we should change the description before any more examples get added. [[User:MagiMaster|MagiMaster]] 21:28, 18 June 2011 (UTC)
::: I'm going to have to let someone else do it though. I'm no good at picking out demonstrative examples here. I'll fix the C++ code to whatever gets posted. [[User:MagiMaster|MagiMaster]] 21:42, 18 June 2011 (UTC)
 
== Min/max ==
Line 67 ⟶ 68:
::Also, since you are building the first[] row in a straight loop, skipping the gaps with "(i != u && i != v)", you should not need to reorder (u,v) at all! [ Which also makes moot the whole `#include algorithm` issue :) ] Using the current C++ code, when I change "rowU = min(u, v); rowV = max(u, v);" to "rowU = u; rowV = v;", the program works correctly for (3,7) and (7,3). --[[User:Util|Util]] 16:52, 11 June 2011 (UTC)
::: Ok. I see what you're saying, but between this and the other section, I can't tell if you're proposing that the task description should be changed so that u should be less than v, or that the C++ code should be changed. [[User:MagiMaster|MagiMaster]] 19:39, 11 June 2011 (UTC)
:::: Thinking about it again, I don't really see the point. Why should we distinguish between reordering columns and reordering rows when both are redundant? [[User:MagiMaster|MagiMaster]] 21:42, 18 June 2011 (UTC)