Click here to Skip to main content
15,889,315 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Radian angle to Quaternion Pin
73Zeppelin18-Dec-08 4:48
73Zeppelin18-Dec-08 4:48 
QuestionPseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs [modified] Pin
efgtdg17-Dec-08 10:07
efgtdg17-Dec-08 10:07 
AnswerRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
73Zeppelin17-Dec-08 22:17
73Zeppelin17-Dec-08 22:17 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
efgtdg18-Dec-08 0:39
efgtdg18-Dec-08 0:39 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
73Zeppelin18-Dec-08 2:00
73Zeppelin18-Dec-08 2:00 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
efgtdg19-Dec-08 0:51
efgtdg19-Dec-08 0:51 
GeneralRe: Pseudocode implementation of the strict timestamp protocol for ensuring serializability, recoverability and cascadeless roll-backs Pin
73Zeppelin19-Dec-08 2:30
73Zeppelin19-Dec-08 2:30 
QuestionQuestion from my Phone Interview Pin
BobInNJ15-Dec-08 10:17
BobInNJ15-Dec-08 10:17 
I recently had a phone interview for a C++ development position. I was given the following problem. You have an array of 101 elements. In the array are the values 1 through 100. There is exactly one value that appears twice. Find the value that appears twice. My first solution was to sort the array and then find the missing value. The second solution was to use a boolean array to keep track of the values already found. He claims that there is a solution required only a minimal amount of additional memory and is of lower order than sorting the array.

We both agreed that if the numbers went from 1 to 1,000,000,000 and the array had 1,000,000,001 numbers in them then my solution first solution would take a long time and my second solution required a lot of additional space. The interviewer claimed that there is a more efficient solution.


However, I cannot find one. I am hoping that somebody out there could tell me what it is.

Thanks

Bob
GeneralSum Pin
Luc Pattyn15-Dec-08 11:19
sitebuilderLuc Pattyn15-Dec-08 11:19 
AnswerRe: Question from my Phone Interview Pin
Member 419459315-Dec-08 11:47
Member 419459315-Dec-08 11:47 
AnswerRe: Question from my Phone Interview Pin
Member 419459315-Dec-08 11:49
Member 419459315-Dec-08 11:49 
GeneralRe: Question from my Phone Interview Pin
BobInNJ15-Dec-08 12:43
BobInNJ15-Dec-08 12:43 
GeneralRe: Question from my Phone Interview Pin
Luc Pattyn15-Dec-08 12:52
sitebuilderLuc Pattyn15-Dec-08 12:52 
GeneralRe: Question from my Phone Interview Pin
Member 419459315-Dec-08 13:05
Member 419459315-Dec-08 13:05 
Generalsum <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Pin
Luc Pattyn15-Dec-08 13:20
sitebuilderLuc Pattyn15-Dec-08 13:20 
GeneralRe: sum <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Pin
Member 419459315-Dec-08 14:43
Member 419459315-Dec-08 14:43 
GeneralRe: sum <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Pin
riced18-Dec-08 12:47
riced18-Dec-08 12:47 
GeneralNot Cobol Pin
Luc Pattyn18-Dec-08 12:59
sitebuilderLuc Pattyn18-Dec-08 12:59 
GeneralRe: Not Cobol Pin
riced18-Dec-08 13:27
riced18-Dec-08 13:27 
GeneralRe: Not Cobol Pin
Luc Pattyn18-Dec-08 13:39
sitebuilderLuc Pattyn18-Dec-08 13:39 
GeneralRe: Question from my Phone Interview Pin
leonej_dt15-Dec-08 13:33
leonej_dt15-Dec-08 13:33 
AnswerFinding an extra/missing number Pin
supercat918-Dec-08 9:56
supercat918-Dec-08 9:56 
GeneralRe: Question from my Phone Interview Pin
Luc Pattyn18-Dec-08 13:15
sitebuilderLuc Pattyn18-Dec-08 13:15 
GeneralRe: Finding several extra/missing numbers Pin
Luc Pattyn19-Dec-08 1:28
sitebuilderLuc Pattyn19-Dec-08 1:28 
GeneralRe: Finding several extra/missing numbers Pin
supercat919-Dec-08 7:00
supercat919-Dec-08 7:00 

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.