Click here to Skip to main content
13,259,847 members (53,872 online)

Algorithms

 
GeneralRe: Robot voice and FFT Pin
Albert Holguin22-Jan-14 4:14
professionalAlbert Holguin22-Jan-14 4:14 
QuestionHow to get the index of a cell in a Table Pin
pix_programmer20-Dec-12 2:27
memberpix_programmer20-Dec-12 2:27 
AnswerRe: How to get the index of a cell in a Table Pin
Richard MacCutchan20-Dec-12 3:10
mvpRichard MacCutchan20-Dec-12 3:10 
QuestionWhen completing a bespoke programme should I give the code up? Pin
itorchuk17-Dec-12 9:08
memberitorchuk17-Dec-12 9:08 
AnswerRe: When completing a bespoke programme should I give the code up? Pin
jschell17-Dec-12 9:27
memberjschell17-Dec-12 9:27 
GeneralRe: When completing a bespoke programme should I give the code up? Pin
itorchuk17-Dec-12 9:37
memberitorchuk17-Dec-12 9:37 
QuestionChecking the network Pin
en41115-Sep-12 8:24
memberen41115-Sep-12 8:24 
AnswerlinkRe: Checking the network Pin
YvesDaoust21-Sep-12 1:11
memberYvesDaoust21-Sep-12 1:11 
Sorry, I see nothing difficult in this problem statement. Or maybe is it just that you never wrote a program ? Or are you asking how to represent the network topology and path costs ?

For a), scan the array and check if two consecutive indexes are the same.

For b), scan the array and check if every pair of indexes are linked in the user-supplied topology (you need some function that will query the topology and tell you if a link exists).

For c), the condition is a[5] != 5.

For d), use a double loop: the outer loop from i=1 to 4, the inner loop for j=i+1 to 5. In the body of the inner loop, test a[i] == a[j].

Accumulating the path costs is also obvious once you have a query function per network link.
QuestionWhat kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 10:18
memberGrooverFromHolland9-Sep-12 10:18 
AnswerRe: What kind of checksum can this be? Pin
Alan N9-Sep-12 12:55
memberAlan N9-Sep-12 12:55 
GeneralRe: What kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 23:15
memberGrooverFromHolland9-Sep-12 23:15 
QuestionnQueens algorithm Pin
PIEBALDconsult31-Dec-11 5:02
memberPIEBALDconsult31-Dec-11 5:02 
AnswerRe: nQueens algorithm Pin
DaveAuld31-Dec-11 5:49
mentorDaveAuld31-Dec-11 5:49 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult31-Dec-11 16:08
memberPIEBALDconsult31-Dec-11 16:08 
GeneralRe: nQueens algorithm Pin
Member 41945931-Jan-12 14:20
memberMember 41945931-Jan-12 14:20 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult1-Jan-12 17:14
memberPIEBALDconsult1-Jan-12 17:14 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult9-Jan-12 14:15
memberPIEBALDconsult9-Jan-12 14:15 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 9:25
memberMember 419459311-Jan-12 9:25 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 10:35
memberPIEBALDconsult11-Jan-12 10:35 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 11:01
memberMember 419459311-Jan-12 11:01 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 11:22
memberPIEBALDconsult11-Jan-12 11:22 
GeneralRe: nQueens algorithm Pin
Member 419459311-Jan-12 11:42
memberMember 419459311-Jan-12 11:42 
GeneralRe: nQueens algorithm Pin
PIEBALDconsult11-Jan-12 12:16
memberPIEBALDconsult11-Jan-12 12:16 
GeneralMessage Closed Pin
17-Jan-12 5:12
memberMember 824164617-Jan-12 5:12 
Question15 puzzle solution in C or C++ Pin
123lucy457-Apr-10 6:25
member123lucy457-Apr-10 6:25 

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.


Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 16 Nov 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid