Click here to Skip to main content
15,890,512 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: booth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
harold aptroot28-Sep-16 3:11
harold aptroot28-Sep-16 3:11 
GeneralRe: booth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
EZCodeProject28-Sep-16 7:08
EZCodeProject28-Sep-16 7:08 
QuestionTrying to get additions, deletions and changes between 2 file versions Pin
Christopher Cote26-Sep-16 2:56
Christopher Cote26-Sep-16 2:56 
AnswerRe: Trying to get additions, deletions and changes between 2 file versions Pin
Peter_in_278026-Sep-16 17:41
professionalPeter_in_278026-Sep-16 17:41 
GeneralRe: Trying to get additions, deletions and changes between 2 file versions Pin
Christopher Cote5-Dec-16 3:12
Christopher Cote5-Dec-16 3:12 
QuestionCompress items of size based on width and height Pin
jkirkerx20-Sep-16 13:59
professionaljkirkerx20-Sep-16 13:59 
SuggestionRe: Compress items of size based on width and height Pin
Maciej Los26-Sep-16 4:44
mveMaciej Los26-Sep-16 4:44 
AnswerRe: Compress items of size based on width and height Pin
Maciej Los26-Sep-16 12:01
mveMaciej Los26-Sep-16 12:01 
Well... i'm pretty sure, you have to rethink your concept of programme...
Imagine, you have a box (container):
Height (3)
      _ _ _ _ _ _ 
    /|           |
   / |           |
  /  |_ _ _ _ _ _|
 /   /           /
/   /           /
|  /           /
| /           / Length (72)
|/_ _ _ _ _ _/
  Width (24)
In that container 6 smaller boxes(containers {72x4x3}) are there. You want to repack these boxes into container with changed width and height:
Height (6)
      _ _ _ _
    /|       |
   / |       |
  /  |       |
 /   |       | 
/    |       |
|    |_ _ _ _|
|    /       /
|   /       /
|  /       /
| /       / Length (72)
|/_ _ _ _/
Width (12)

Assuming, that you want to find out, if there's possibility to repack these innercontainers, your algorithm have to check, if:
- any dimension of innercontainer does not exceed the size of outercontainer,
- occupied area inside a box (sum of innercontainers areas) is smaller than outercontainer.

Till above condition is met, you can add another box (innercontainer)!
Note, that:
Area (of box) = Width * Length * Height<br />
Occupied area = sum of innercontainers areas.


And finall note: do not change the size of outer-box, create new one and repack all boxes Wink | ;)

Try!
GeneralRe: Compress items of size based on width and height Pin
jkirkerx27-Sep-16 7:46
professionaljkirkerx27-Sep-16 7:46 
QuestionRe: Compress items of size based on width and height [Modified] Pin
Maciej Los27-Sep-16 8:39
mveMaciej Los27-Sep-16 8:39 
AnswerRe: Compress items of size based on width and height [Modified] Pin
jkirkerx27-Sep-16 10:42
professionaljkirkerx27-Sep-16 10:42 
GeneralRe: Compress items of size based on width and height [Modified] Pin
Maciej Los27-Sep-16 21:41
mveMaciej Los27-Sep-16 21:41 
GeneralRe: Compress items of size based on width and height [Modified] Pin
jkirkerx28-Sep-16 6:36
professionaljkirkerx28-Sep-16 6:36 
GeneralThis is what I released today for production testing Pin
jkirkerx30-Sep-16 7:26
professionaljkirkerx30-Sep-16 7:26 
GeneralRe: This is what I released today for production testing Pin
Maciej Los4-Oct-16 9:22
mveMaciej Los4-Oct-16 9:22 
GeneralRe: This is what I released today for production testing Pin
jkirkerx4-Oct-16 9:30
professionaljkirkerx4-Oct-16 9:30 
GeneralRe: This is what I released today for production testing Pin
Maciej Los4-Oct-16 9:34
mveMaciej Los4-Oct-16 9:34 
GeneralRe: This is what I released today for production testing Pin
jkirkerx4-Oct-16 9:37
professionaljkirkerx4-Oct-16 9:37 
QuestionJoin lines text file using binary difference Pin
muttleychess1-Sep-16 5:34
muttleychess1-Sep-16 5:34 
AnswerRe: Join lines text file using binary difference Pin
Gerry Schmitz1-Sep-16 6:13
mveGerry Schmitz1-Sep-16 6:13 
GeneralRe: Join lines text file using binary difference Pin
muttleychess1-Sep-16 6:38
muttleychess1-Sep-16 6:38 
GeneralRe: Join lines text file using binary difference Pin
Gerry Schmitz1-Sep-16 6:50
mveGerry Schmitz1-Sep-16 6:50 
GeneralRe: Join lines text file using binary difference Pin
muttleychess1-Sep-16 7:49
muttleychess1-Sep-16 7:49 
GeneralRe: Join lines text file using binary difference Pin
Gerry Schmitz1-Sep-16 8:43
mveGerry Schmitz1-Sep-16 8:43 
QuestionConsesus algorithms Raft and Paxos comparison question Pin
Member 1270735628-Aug-16 1:40
Member 1270735628-Aug-16 1:40 

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.