About Algorithm: Difference between revisions

From My Limbic Wiki
Line 22: Line 22:
* '''Class Singleton''' with a private constructor
* '''Class Singleton''' with a private constructor
** Private static parameter '''single_instance''' set to null
** Private static parameter '''single_instance''' set to null
** Private static Method '''getInstance():''' if the parameter is null, instanciate singleton class, if not return the existing instance;
** Private static Method '''getInstance():''' '''if''' the parameter '''is null''', instantiate Singleton class as '''New''', if not return the existing instance returning the parameter '''single_instance'''
Every instantiation has to be called as: '''Singleton.getInstance();'''
Every instantiation has to be called as: '''Singleton.getInstance();'''



Revision as of 02:48, 10 May 2019

Most Famous Algorithm

  • Euclide
  • Karatsuba
  • Horner

Sorting Algoritms

  • Fibonacci
  • Dichotomy
  • Factorial
  • Hanoï tours
  • Bubble

Graphs

  • Dijkstra
  • Topologic sorting

Cryptography & Compression

  • Shannon-Fano
  • Huffman
  • Diffie-Hellman
  • RSA

Prime Numbers

  • ?

Singleton

  • Class Singleton with a private constructor
    • Private static parameter single_instance set to null
    • Private static Method getInstance(): if the parameter is null, instantiate Singleton class as New, if not return the existing instance returning the parameter single_instance

Every instantiation has to be called as: Singleton.getInstance();

Most beautiful Equation