Content deleted Content added
m Replaced deprecated <source> tags with <syntaxhighlight> (via WP:JWB) |
syntaxhighlight & fix lint |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1:
{{WikiProject banner shell|class=|
{{WikiProject Computer science}}
}}
== Possibly Erroneous Initialization of s ==
Line 105 ⟶ 107:
here is a working script
<syntaxhighlight lang="text">
max_ending_here = A[0]
Line 126 ⟶ 128:
print (max_so_far , start, end)
</syntaxhighlight>
== Issues with the "History" section, regarding brute-force ==
Line 162 ⟶ 164:
As written, this does not pass my historical smell test. — [[user:MaxEnt|MaxEnt]] 02:09, 12 May 2020 (UTC)
== Empty subarrays admitted vs. forbidden ==
In order to reduce the number of good-faith edits like [https://en.wikipedia.org/w/index.php?title=Maximum_subarray_problem&diff=1174756409&oldid=1165256313 the most recent one], what about presenting the "''No empty subarrays admitted''" variant first, and in full detail, and then just the changes needed to turn it into the "''Empty subarrays admitted''" variant? If we are lucky, most over-hasty ad-hoc page editors are familar with the "''No empty subarrays admitted''" variant, and won't change the text, since it meets their expectations. However, if we are unlucky, the favorite variants are distributed 50:50, and we'd experience lots of thoughtless edits in the opposite direction. I think, implementing my suggestion is worth a try. - [[User:Jochen Burghardt|Jochen Burghardt]] ([[User talk:Jochen Burghardt|talk]]) 14:55, 10 September 2023 (UTC)
:I'm skeptical that this will help but it seems harmless enough and worth a try. —[[User:David Eppstein|David Eppstein]] ([[User talk:David Eppstein|talk]]) 18:45, 10 September 2023 (UTC)
::{{done}}. Some complications were caused by the fact that both Bentley and Gries refer to the "empty" variant, while we start with the "nonempty" variant. The worst of them is the new [note6] which now has to explain a modification the Bentley should have made in the ''previous'' (rather than the ''current'') variant. - I gave the essential loop invariants for both algorithm variants; they could (after some days of trial and error) be verified by [[Frama-C]], so they shouldn't be flawed. - [[User:Jochen Burghardt|Jochen Burghardt]] ([[User talk:Jochen Burghardt|talk]]) 15:28, 13 September 2023 (UTC)
|