Click here to Skip to main content
15,891,431 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem in creating Popup Pin
Nishad S8-Jun-06 20:49
Nishad S8-Jun-06 20:49 
AnswerRe: Problem in creating Popup Pin
Hamid_RT8-Jun-06 20:41
Hamid_RT8-Jun-06 20:41 
GeneralRe: Problem in creating Popup [modified] Pin
Raja Bose C Leo8-Jun-06 20:46
Raja Bose C Leo8-Jun-06 20:46 
QuestionRe: Problem in creating Popup Pin
Hamid_RT8-Jun-06 20:52
Hamid_RT8-Jun-06 20:52 
GeneralRe: Problem in creating Popup Pin
Nishad S8-Jun-06 20:53
Nishad S8-Jun-06 20:53 
GeneralRe: Problem in creating Popup Pin
Hamid_RT8-Jun-06 21:02
Hamid_RT8-Jun-06 21:02 
GeneralRe: Problem in creating Popup Pin
Nishad S8-Jun-06 21:10
Nishad S8-Jun-06 21:10 
Question[interesting question] find an element which is sum of two other elements [modified] Pin
George_George8-Jun-06 20:10
George_George8-Jun-06 20:10 
--------------------------------------------------------------------------------

Hello everyone,


I am discussing with my friends about an interesting question about find the maximum element in a set, which is the sum of two other elements.

For example, in set {1, 2, 3, 5, 8, 10}, the answer is 10 (10 = 8 + 2),
which is the maximum element we can find, and it is the sum of two
other elements (8 and 2) in the set.

Currently, I only have brute-force solution. Sorting the set, which takes O(nlgn) time, then enumerate them one by one to find whether two elements can sum up to the maximum element (if the most maximum element does not meet the condition, move to the second largest one), which takes O(n^2) time, so the total time complexity is O(n^2).

I am wondering whether any one have better ideas?


thanks in advance,
George
QuestionCombo-Box with (Auto) Horizontal Scroll ? Pin
Andy Rama8-Jun-06 20:08
Andy Rama8-Jun-06 20:08 
AnswerRe: Combo-Box with (Auto) Horizontal Scroll ? Pin
Nishad S8-Jun-06 20:43
Nishad S8-Jun-06 20:43 
AnswerRe: Combo-Box with (Auto) Horizontal Scroll ? Pin
Viorel.8-Jun-06 21:10
Viorel.8-Jun-06 21:10 
QuestionHelp in CComboBox and CListCtrl Pin
murali_utr8-Jun-06 19:31
murali_utr8-Jun-06 19:31 
AnswerRe: Help in CComboBox and CListCtrl Pin
Hamid_RT8-Jun-06 19:41
Hamid_RT8-Jun-06 19:41 
GeneralRe: Help in CComboBox and CListCtrl Pin
murali_utr8-Jun-06 20:01
murali_utr8-Jun-06 20:01 
AnswerRe: Help in CComboBox and CListCtrl Pin
Naveen8-Jun-06 19:46
Naveen8-Jun-06 19:46 
Questionhow to get saved as the bitmap the whole html document with the scrollbars Pin
Anamika20058-Jun-06 19:17
Anamika20058-Jun-06 19:17 
AnswerRe: how to get saved as the bitmap the whole html document with the scrollbars Pin
Monty28-Jun-06 20:06
Monty28-Jun-06 20:06 
GeneralRe: how to get saved as the bitmap the whole html document with the scrollbars Pin
Anamika20058-Jun-06 21:11
Anamika20058-Jun-06 21:11 
AnswerRe: how to get saved as the bitmap the whole html document with the scrollbars Pin
Viorel.8-Jun-06 22:33
Viorel.8-Jun-06 22:33 
Questionhow to diable the popup dialog in main dialog Pin
happy_ram8-Jun-06 19:00
happy_ram8-Jun-06 19:00 
AnswerRe: how to diable the popup dialog in main dialog Pin
Hamid_RT8-Jun-06 19:08
Hamid_RT8-Jun-06 19:08 
AnswerRe: how to diable the popup dialog in main dialog Pin
Naveen8-Jun-06 19:24
Naveen8-Jun-06 19:24 
AnswerRe: how to diable the popup dialog in main dialog Pin
_AnsHUMAN_ 8-Jun-06 19:26
_AnsHUMAN_ 8-Jun-06 19:26 
GeneralRe: how to diable the popup dialog in main dialog Pin
Naveen8-Jun-06 19:30
Naveen8-Jun-06 19:30 
GeneralRe: how to diable the popup dialog in main dialog Pin
happy_ram8-Jun-06 19:33
happy_ram8-Jun-06 19:33 

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.