Anonymous user
Two sum: Difference between revisions
m
→{{header|Pascal}}: one time to often STRG-V
m (→{{header|Pascal}}: using GOTO to speed things up) |
m (→{{header|Pascal}}: one time to often STRG-V) |
||
Line 56:
A little bit lengthy. Implemented an unsorted Version with quadratic runtime too and an extra test case with 83667 elements that needs 83667*86666/2 ~ 3.5 billion checks ( ~1 cpu-cycles/check, only if data in cache ).
<lang pascal>program twosum;
{$IFDEF FPC}{$MODE DELPHI}{$ELSE}{$APPTYPE CONSOLE}{$ENDIF}
uses
|