ChatGPT examples

Mark Waddingham mark at livecode.com
Fri Jan 20 11:52:46 EST 2023


On 2023-01-20 13:05, Alex Tweedly via use-livecode wrote:
> We need a better algorithm. If we use a "linear scan", we can change
> it from essentially Order(N**2) to approx Order(N).

Slightly pedantic point (I appreciate that you did say 'approx')...

Sorting can not be done in any less time than O(N*log N) - so the 
revised algorithm is O(N*log N) as you have to sort the input for it to 
be able to scan linearly.

:D

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things



More information about the use-livecode mailing list