Click here to Skip to main content
15,904,877 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Wildcard Matching Routine Pin
trønderen10-Feb-22 6:03
trønderen10-Feb-22 6:03 
GeneralRe: Wildcard Matching Routine Pin
englebart10-Feb-22 9:14
professionalenglebart10-Feb-22 9:14 
QuestionTime Complexity of following method? Pin
Member 1269110623-Nov-21 4:09
Member 1269110623-Nov-21 4:09 
AnswerRe: Time Complexity of following method? Pin
Greg Utas23-Nov-21 5:17
professionalGreg Utas23-Nov-21 5:17 
GeneralRe: Time Complexity of following method? Pin
Member 1269110623-Nov-21 18:22
Member 1269110623-Nov-21 18:22 
AnswerRe: Time Complexity of following method? Pin
Member 1269110623-Nov-21 19:05
Member 1269110623-Nov-21 19:05 
AnswerRe: Time Complexity of following method? Pin
Member 1546299610-Dec-21 5:08
Member 1546299610-Dec-21 5:08 
QuestionNUMBER OF COMBINATIONS OF THE ARRANGEMENT OF CAPS Pin
Member 1543482417-Nov-21 13:48
Member 1543482417-Nov-21 13:48 
Is there any fast algorithm for this:
K people sit at a table. Each person holds a number (hi) which means: some of his neighbour has a cap of height (hi). I want to count the number of combinations for setting people up at the table according to their height of their cups.

Example:

in:
6
2 6 4 5 3 5
out:
2
(We have two combinations which are 1 2 6 4 5 3 and 6 2 1 4 5 3)
Explanation:
We know that first person points on the second person and last person points on the penultimate person. The neighbour of the second person on the left is two, so his neighbour with height 4 should be on the right. Next we know that left neighbour of fifth person is 4, so his neighbour with height 3 should be on the right. We have two combinations to place 1, 6 cups (1,6 and 6, 1):

Visualisation:
2 6 4 5 3 5
X 2 X X 5 X
X 2 X 4 5 3

Possibilities: 1 2 6 4 5 3 or 6 2 1 4 5 3

Any suggestions or help would be greatly appreciated.

AnswerRe: NUMBER OF COMBINATIONS OF THE ARRANGEMENT OF CAPS Pin
Greg Utas23-Nov-21 5:14
professionalGreg Utas23-Nov-21 5:14 
QuestionC# Pin
Member 153810723-Oct-21 21:36
Member 153810723-Oct-21 21:36 
AnswerRe: C# Pin
Richard MacCutchan3-Oct-21 21:49
mveRichard MacCutchan3-Oct-21 21:49 
QuestionFunction of algorithm Pin
danindya1-Sep-21 15:52
professionaldanindya1-Sep-21 15:52 
AnswerRe: Function of algorithm - Spammer Pin
Dave Kreskowiak1-Sep-21 16:23
mveDave Kreskowiak1-Sep-21 16:23 
QuestionHelp with allocation algorithm Pin
Cynthia Moore24-Aug-21 19:43
Cynthia Moore24-Aug-21 19:43 
AnswerRe: Help with allocation algorithm Pin
Gerry Schmitz25-Aug-21 18:49
mveGerry Schmitz25-Aug-21 18:49 
GeneralRe: Help with allocation algorithm Pin
Cynthia Moore25-Aug-21 19:42
Cynthia Moore25-Aug-21 19:42 
GeneralRe: Help with allocation algorithm Pin
Gerry Schmitz26-Aug-21 4:37
mveGerry Schmitz26-Aug-21 4:37 
GeneralRe: Help with allocation algorithm Pin
Cynthia Moore26-Aug-21 7:16
Cynthia Moore26-Aug-21 7:16 
AnswerRe: Help with allocation algorithm Pin
BillWoodruff28-Aug-21 16:09
professionalBillWoodruff28-Aug-21 16:09 
QuestionWhich is the more preferred approach for novice coders, depth first search, or, breadth first search? Pin
the prestige city23-Jul-21 1:23
professionalthe prestige city23-Jul-21 1:23 
AnswerRe: Which is the more preferred approach for novice coders, depth first search, or, breadth first search? Pin
Gerry Schmitz24-Jul-21 7:15
mveGerry Schmitz24-Jul-21 7:15 
AnswerRe: Which is the more preferred approach for novice coders, depth first search, or, breadth first search? Pin
David Camp5-Oct-22 14:51
David Camp5-Oct-22 14:51 
AnswerRe: Which is the more preferred approach for novice coders, depth first search, or, breadth first search? Pin
prestige primrose hills phase 210-Nov-22 22:21
professionalprestige primrose hills phase 210-Nov-22 22:21 
AnswerRe: Which is the more preferred approach for novice coders, depth first search, or, breadth first search? Pin
Provident Ecopolitan Bagalur20-Jul-23 21:09
Provident Ecopolitan Bagalur20-Jul-23 21:09 
QuestionFind cartesians for matrix elements Pin
Member 1528858613-Jul-21 19:38
Member 1528858613-Jul-21 19:38 

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.