Click here to Skip to main content
15,914,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hi Pin
David Crow18-May-09 9:22
David Crow18-May-09 9:22 
GeneralRe: Hi Pin
Mohammadj18-May-09 22:01
Mohammadj18-May-09 22:01 
QuestionRe: Hi Pin
David Crow19-May-09 2:40
David Crow19-May-09 2:40 
AnswerRe: Hi Pin
Mohammadj20-May-09 22:24
Mohammadj20-May-09 22:24 
QuestionRe: Hi Pin
David Crow21-May-09 2:50
David Crow21-May-09 2:50 
QuestionBigNum Pin
AndreFratelli11-May-09 2:51
AndreFratelli11-May-09 2:51 
QuestionRe: BigNum Pin
Divyang Mithaiwala11-May-09 3:35
Divyang Mithaiwala11-May-09 3:35 
AnswerRe: BigNum Pin
harold aptroot11-May-09 4:05
harold aptroot11-May-09 4:05 
QuestionRe: BigNum Pin
David Crow11-May-09 4:39
David Crow11-May-09 4:39 
QuestionRe: BigNum Pin
CPallini11-May-09 5:13
mveCPallini11-May-09 5:13 
QuestionUnable to Install Plateform SDK Pin
pandit8411-May-09 2:20
pandit8411-May-09 2:20 
AnswerRe: Unable to Install Plateform SDK Pin
Naveen11-May-09 2:25
Naveen11-May-09 2:25 
GeneralRe: Unable to Install Plateform SDK Pin
pandit8411-May-09 3:45
pandit8411-May-09 3:45 
GeneralRe: Unable to Install Plateform SDK Pin
Naveen11-May-09 3:51
Naveen11-May-09 3:51 
Questionwmi problem Pin
Mogaambo11-May-09 2:19
Mogaambo11-May-09 2:19 
AnswerRe: wmi problem Pin
«_Superman_»11-May-09 2:35
professional«_Superman_»11-May-09 2:35 
Questionbuild errors Pin
josip cagalj11-May-09 1:36
josip cagalj11-May-09 1:36 
AnswerRe: build errors Pin
josip cagalj11-May-09 2:26
josip cagalj11-May-09 2:26 
QuestionHow to compress an image? Pin
kapardhi11-May-09 1:30
kapardhi11-May-09 1:30 
AnswerRe: How to compress an image? Pin
CPallini11-May-09 1:41
mveCPallini11-May-09 1:41 
AnswerRe: How to compress an image? Pin
Stuart Dootson11-May-09 6:00
professionalStuart Dootson11-May-09 6:00 
QuestionSkip list takes so much time in insertion Pin
Risa Harada11-May-09 0:56
Risa Harada11-May-09 0:56 
AnswerRe: Skip list takes so much time in insertion Pin
Stuart Dootson11-May-09 5:58
professionalStuart Dootson11-May-09 5:58 
Risa Harada wrote:
O(log n)


What that defines is how the insertion time grows with n. It does not say that the skip list insertion time is less than the time taken to insert an item into other data structures.

Risa Harada wrote:
void insert(SkipList* ss, CString value, CString pos, CString longe)

Risa Harada wrote:
SkipNode* make_node(int level, CString mots, CString pos, CString longe)


Pass things like CStrings BY REFERENCE. In this case, by const reference:

void insert(SkipList* ss, const CString & value, const CString & pos, const CString & longe)
SkipNode* make_node(int level, const CString & mots, const CString & pos, const CString & longe) 


Other data structures probably have better characteristics for this

  • vectors are nice because they've been optimised - it's generally reckoned that if you're going to be reading from and searching in your data structure a lot, you're best off using a vector, sorting it and using std::lower_bound to search.

  • std::map or std::set has probably been better optimised
  • A trie[^] or alternatively a ternary search tree[^] is generally reckoned to be good for storing words


HTH

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Skip list takes so much time in insertion Pin
Risa Harada11-May-09 6:20
Risa Harada11-May-09 6:20 
Generalproblem with CryptStringToBinary. Pin
Vineet Kumar11-May-09 0:52
Vineet Kumar11-May-09 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.