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

Algorithms

 
QuestionTable comparison material Pin
aggressor_us12-Nov-08 13:29
aggressor_us12-Nov-08 13:29 
AnswerRe: Table comparison material Pin
Member 419459315-Nov-08 12:22
Member 419459315-Nov-08 12:22 
GeneralRe: Table comparison material Pin
aggressorus17-Nov-08 6:09
aggressorus17-Nov-08 6:09 
GeneralRe: Table comparison material Pin
Member 419459317-Nov-08 12:40
Member 419459317-Nov-08 12:40 
GeneralRe: Table comparison material Pin
aggressorus9-Dec-08 7:13
aggressorus9-Dec-08 7:13 
QuestionBuffering data for delimiter seperated blocks (theoretical question) Pin
invictus311-Nov-08 11:29
invictus311-Nov-08 11:29 
AnswerRe: Buffering data for delimiter seperated blocks (theoretical question) Pin
Arash Partow12-Nov-08 0:57
Arash Partow12-Nov-08 0:57 
AnswerRe: Buffering data for delimiter separated blocks (theoretical question) Pin
Alan Balkany12-Nov-08 3:37
Alan Balkany12-Nov-08 3:37 
It sounds like you need to make a policy decision that's algorithm-independent: How large can a block be before you decide it's a denial-of-service attack?

This is domain-dependent. It depends on the knowledge you have of blocks' contents from your particular domain, and on the resources of your system. If you have lots of memory, you can afford to accept a big block on the chance it may be real.

The memory-reallocation approach wastes time because each reallocation requires you to recopy all the data received for that block so far. This starts to approach an O(n^2) running time for what should be a linear algorithm.

It seems like a buffer pool would use up memory waiting for big blocks that may never come. It would also limit the maximum size of a block you could accept.

The linked-list approach is the standard way of dealing with this type of situation; don't preallocate anything, and dynamically allocate blocks as you need them.
QuestionConstructing a convex hull. Pin
Member 419459311-Nov-08 8:56
Member 419459311-Nov-08 8:56 
AnswerRe: Constructing a convex hull. Pin
Arash Partow12-Nov-08 0:45
Arash Partow12-Nov-08 0:45 
GeneralRe: Constructing a convex hull. Pin
Member 419459312-Nov-08 4:58
Member 419459312-Nov-08 4:58 
GeneralRe: Constructing a convex hull. Pin
Member 419459312-Nov-08 5:13
Member 419459312-Nov-08 5:13 
QuestionLimit finding Pin
Hadi Dayvary6-Nov-08 10:19
professionalHadi Dayvary6-Nov-08 10:19 
AnswerRe: Limit finding Pin
73Zeppelin6-Nov-08 10:26
73Zeppelin6-Nov-08 10:26 
GeneralRe: Limit finding Pin
Hadi Dayvary6-Nov-08 10:37
professionalHadi Dayvary6-Nov-08 10:37 
GeneralRe: Limit finding Pin
BobInNJ6-Nov-08 12:57
BobInNJ6-Nov-08 12:57 
GeneralRe: Limit finding Pin
bulg6-Nov-08 13:59
bulg6-Nov-08 13:59 
GeneralRe: Limit finding Pin
73Zeppelin6-Nov-08 21:13
73Zeppelin6-Nov-08 21:13 
GeneralRe: Limit finding Pin
Hadi Dayvary7-Nov-08 9:43
professionalHadi Dayvary7-Nov-08 9:43 
GeneralRe: Limit finding Pin
73Zeppelin7-Nov-08 18:44
73Zeppelin7-Nov-08 18:44 
GeneralOff-Topic Pin
soap brain8-Nov-08 1:16
soap brain8-Nov-08 1:16 
GeneralRe: Off-Topic Pin
User 17164928-Nov-08 1:38
professionalUser 17164928-Nov-08 1:38 
GeneralRe: Off-Topic Pin
soap brain8-Nov-08 1:48
soap brain8-Nov-08 1:48 
GeneralRe: Off-Topic Pin
Member 41945938-Nov-08 3:34
Member 41945938-Nov-08 3:34 
GeneralRe: Off-Topic [modified] Pin
soap brain8-Nov-08 3:52
soap brain8-Nov-08 3:52 

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.