Content deleted Content added
Added a section stating that the initialization of s is possibly erroneous |
|||
Line 9:
First, this assumes that each integer is exactly 4 bytes wide, which is not the case for all architectures.
<s>Second, it seems sufficient to initialize it to the first element of the array, A[0]</s>
[[User:Debajit|Debajit]] ([[User talk:Debajit|talk]]) 23:29, 25 November 2007 (UTC)
: I've struck out my second proposition, which would fail for sequences having exactly one element. For my first proposition, I think s is best initialized to -Infinity as (for C++)
: <source lang="cpp">
int s = numeric_limits<int>::min()
</source>
: or to MIN_INT in C
: [[User:Debajit|Debajit]] ([[User talk:Debajit|talk]]) 23:45, 25 November 2007 (UTC)
==Notability==
|