首先這是個既實際又挑戰的題,可用作google的麵試考題。
個人淺見,不能用那些無序的collection types來存,應用sorted array來存儲。(sort的時候,除了考慮字典順序,可能還得按使用頻率)
這樣,提取時,就可用各種快速搜索算法了。
• 兄台所見極是 -catcherintherye- ♂ (1195 bytes) () 01/20/2009 postreply 22:46:54
• gotta be careful about the size of collection -澳洲老土- ♂ (208 bytes) () 01/21/2009 postreply 00:03:46
WENXUECITY.COM does not represent or guarantee the truthfulness, accuracy, or reliability of any of communications posted by other users.
Copyright ©1998-2024 wenxuecity.com All rights reserved. Privacy Statement & Terms of Use & User Privacy Protection Policy