Click here to Skip to main content
15,921,113 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
QuestionRe: problem with CryptStringToBinary. Pin
CPallini11-May-09 1:39
mveCPallini11-May-09 1:39 
QuestionEdit Control Problem Pin
Padmanabha_M11-May-09 0:15
Padmanabha_M11-May-09 0:15 
AnswerRe: Edit Control Problem Pin
Chandrasekharan P11-May-09 0:18
Chandrasekharan P11-May-09 0:18 
GeneralRe: Edit Control Problem Pin
Padmanabha_M11-May-09 1:01
Padmanabha_M11-May-09 1:01 
GeneralRe: Edit Control Problem Pin
Chandrasekharan P11-May-09 1:26
Chandrasekharan P11-May-09 1:26 
GeneralRe: Edit Control Problem Pin
Padmanabha_M11-May-09 1:30
Padmanabha_M11-May-09 1:30 
GeneralRe: Edit Control Problem Pin
SudharsanC11-May-09 1:41
SudharsanC11-May-09 1:41 
GeneralRe: Edit Control Problem Pin
Padmanabha_M11-May-09 19:58
Padmanabha_M11-May-09 19:58 
QuestionBlind out the Effects, color, Script, underline , struck through in CFontDialog Pin
susanne110-May-09 23:54
susanne110-May-09 23:54 
AnswerRe: Blind out the Effects, color, Script, underline , struck through in CFontDialog Pin
«_Superman_»11-May-09 2:17
professional«_Superman_»11-May-09 2:17 
GeneralRe: Blind out the Effects, color, Script, underline , struck through in CFontDialog Pin
susanne111-May-09 2:51
susanne111-May-09 2:51 
GeneralRe: Blind out the Effects, color, Script, underline , struck through in CFontDialog Pin
«_Superman_»11-May-09 16:06
professional«_Superman_»11-May-09 16:06 
GeneralRe: Blind out the Effects, color, Script, underline , struck through in CFontDialog Pin
susanne111-May-09 21:57
susanne111-May-09 21:57 
QuestionC2664 error Pin
subramanyeswari10-May-09 23:47
subramanyeswari10-May-09 23:47 
AnswerRe: C2664 error Pin
Madhu Nair11-May-09 0:02
Madhu Nair11-May-09 0:02 

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.