Click here to Skip to main content
15,885,366 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionLong Division / Assembly Language Style Pin
C-P-User-313-Oct-20 4:34
C-P-User-313-Oct-20 4:34 
AnswerRe: Long Division / Assembly Language Style Pin
Richard Deeming13-Oct-20 4:53
mveRichard Deeming13-Oct-20 4:53 
GeneralRe: Long Division / Assembly Language Style Pin
harold aptroot13-Oct-20 5:31
harold aptroot13-Oct-20 5:31 
AnswerRe: Long Division / Assembly Language Style Pin
trønderen13-Oct-20 6:25
trønderen13-Oct-20 6:25 
GeneralRe: Long Division / Assembly Language Style Pin
Greg Utas13-Oct-20 12:04
professionalGreg Utas13-Oct-20 12:04 
AnswerRe: Long Division / Assembly Language Style Pin
Gerry Schmitz13-Oct-20 8:33
mveGerry Schmitz13-Oct-20 8:33 
AnswerRe: Long Division / Assembly Language Style Pin
Patrice T6-Nov-20 15:46
mvePatrice T6-Nov-20 15:46 
QuestionFinding possible combinations for tetris-like cages Pin
vinaysingh8424-Sep-20 14:25
vinaysingh8424-Sep-20 14:25 
I'm trying to create/solve a puzzle in which you are given tetris-like cages in which digits will be placed but cannot have 2 digits in the same row or same column. The goal is to determine the possibilities of doubles and triples [doubles,triples] for a given cage.
For example, with the cage
JavaScript
[[0,1]
 [1,1]]
in which 1's indicate cells in the cage, up to 1 double ([1,0]) is allowed.
The restrictions for the cage input is it has a max width of 8, a max height of 3 and max size (# of 1's) of 8.

Here are some more examples along with there possible outputs:
JavaScript
[[1,1],
 [1,0],
 [1,0]]
// Output should be [[1,0]]
JavaScript
[[1,1],
 [1,1]]
// Output should be [[2,0]]
JavaScript
[[1,1],
 [1,0],
 [1,1]] 
// Output should be [[2,0]]
JavaScript
[[1,1,1],
 [1,0,0],
 [1,0,0]]
// Output should be [[2,0]]
JavaScript
[[1,1,0],
 [0,1,1]]
// Output should be [[2,0]]
JavaScript
[[1,1,0],
 [0,1,0],
 [0,1,1]]
// Output should be [[2,0],[0,1]]
JavaScript
[[1,0,0],
 [1,1,0],
 [1,1,1]]
// Output should be [[3,0],[1,1]]
JavaScript
[[1,1,1],
 [1,0,1],
 [1,0,1]]
// Output should be [[3,0],[2,1]]
JavaScript
[[1,1,1],
 [1,0,1],
 [1,1,1]]
// Output should be [[4,0],[2,1],[1,2]]
Please reach out with any questions. I appreciate the help figuring out how to do this programmatically!
AnswerRe: Finding possible combinations for tetris-like cages Pin
Gerry Schmitz25-Sep-20 7:41
mveGerry Schmitz25-Sep-20 7:41 
AnswerRe: Finding possible combinations for tetris-like cages Pin
vinaysingh8429-Sep-20 13:15
vinaysingh8429-Sep-20 13:15 
QuestionCalculate time complexity step by step of given two program program Pin
Member 1151248623-Sep-20 0:22
Member 1151248623-Sep-20 0:22 
AnswerRe: Calculate time complexity step by step of given two program program Pin
Richard MacCutchan23-Sep-20 3:34
mveRichard MacCutchan23-Sep-20 3:34 
AnswerRe: Calculate time complexity step by step of given two program program Pin
trønderen23-Sep-20 4:07
trønderen23-Sep-20 4:07 
AnswerRe: Calculate time complexity step by step of given two program program Pin
Gerry Schmitz24-Sep-20 13:01
mveGerry Schmitz24-Sep-20 13:01 
QuestionRandom File & Folder Names Pin
Richard Andrew x6422-Sep-20 10:42
professionalRichard Andrew x6422-Sep-20 10:42 
AnswerRe: Random File & Folder Names Pin
Victor Nijegorodov22-Sep-20 10:56
Victor Nijegorodov22-Sep-20 10:56 
GeneralRe: Random File & Folder Names Pin
Richard Andrew x6422-Sep-20 11:06
professionalRichard Andrew x6422-Sep-20 11:06 
QuestionHow can I calculate time complexity and compare between given two algorithms? Pin
Member 1151248618-Sep-20 18:12
Member 1151248618-Sep-20 18:12 
QuestionRe: How can I calculate time complexity and compare between given two algorithms? Pin
Richard MacCutchan18-Sep-20 21:42
mveRichard MacCutchan18-Sep-20 21:42 
AnswerRe: How can I calculate time complexity and compare between given two algorithms? Pin
Member 1151248619-Sep-20 0:45
Member 1151248619-Sep-20 0:45 
AnswerRe: How can I calculate time complexity and compare between given two algorithms? Pin
trønderen19-Sep-20 2:43
trønderen19-Sep-20 2:43 
GeneralRe: How can I calculate time complexity and compare between given two algorithms? Pin
Richard MacCutchan19-Sep-20 3:01
mveRichard MacCutchan19-Sep-20 3:01 
GeneralRe: How can I calculate time complexity and compare between given two algorithms? Pin
trønderen19-Sep-20 7:06
trønderen19-Sep-20 7:06 
GeneralRe: How can I calculate time complexity and compare between given two algorithms? Pin
Richard MacCutchan19-Sep-20 21:05
mveRichard MacCutchan19-Sep-20 21:05 
AnswerRe: How can I calculate time complexity and compare between given two algorithms? Pin
Sandeep Mewara19-Sep-20 0:12
mveSandeep Mewara19-Sep-20 0:12 

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.