TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Pascal Schmidt
from: Darin McBride
date: 2004-05-19 17:29:58
subject: A question

Hello Pascal!

Replying to a message of Pascal Schmidt to Neil Heller:

 PS> What I'm saying is that sometimes an algorithm that looks faster on
 PS> paper turns out to suck in practise.

 PS>>> The most primitive algorithm for this problem 
 PS>>> (compare each with each) would be O(n^2).
 NH>> Yipes, I hope it doesn't come to that.
 PS> That one is very memory efficient, though, and good enough for smaller
 PS> input sets. Think about using your approach for 64 bit integers, how
 PS> much memory would your hash table consume?

With a reasonable hash algorithm, not much more space than the original list ;-)

Darin

---
* Origin: Tanktalus' Tower BBS (1:250/102)
SEEN-BY: 633/267 270
@PATH: 250/102 99 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.