A clear difference between algorithm and a pattern

From: Ravi Shankar (sujashankar_at_pacific.net.sg)
Date: 01/20/04


Date: Tue, 20 Jan 2004 21:07:48 +0800

Hi all,

Can anyone please give me a precise distinction between an algorithm and a
pattern?

When I want to have a single instance, I use "Singleton". Similarly when I
want to sort some numbers I use "QuickSort" algorithm.

Pattern is a quality without a name and is "reusable idea". Algorithm too is
a reusable idea.

hmmm, pls explain!!!

Best regards,
Ravi



Relevant Pages

  • Re: Serialize a Strategy Pattern List of objects with out xsi:type
    ... whether this is a strategy pattern or not. ... depends on how you define algorithm. ... As for your "secondly" comment about homework, ... suggest that you create a seperate class that you will serialize. ...
    (microsoft.public.dotnet.framework)
  • Re: Reading and writing a big file in Ada (GNAT) on Windows XP
    ... memory for a substring; this is very descriptively called memmemand ... common cases (no mapping, single character patterns, and so on). ... So in this case a better algorithm is probably the way to go (and I ... the source length is>M and the pattern length is>N, ...
    (comp.lang.ada)
  • Re: Mersenne Twister
    ... And no PRNG is unpredictable. ... >> Just give me the algorithm and the key and I can predict it ... >hard to write a test which is able to find a pattern. ... Since the key is far far shorter than the stream ...
    (sci.crypt)
  • Re: A clear difference between algorithm and a pattern
    ... A pattern is a "formalized" algorithm. ... arrangements of class abstractions. ... Dijkstra and Parnas software architecture is ...
    (comp.object)
  • Re: Search for byte pattern in a binary file.
    ... one of the algorithms posted does partially solve the buffer ... The Knuth-Morris-Pratt algorithm is a forward-only algorithm, ... If the search pattern is extremely large (on the order of several ... since disk access is extremely slow. ...
    (comp.lang.java.programmer)