| Name | Best | Average | Worst | Memory | Stable | Method | Other notes |
|---|---|---|---|---|---|---|---|
| Insertion sort | Yes | Insertion | Average case is also | ||||
| Binary tree sort | — | Yes | Insertion | When using a self-balancing binary search tree | |||
| Cycle sort | — | No | Insertion | In-place with theoretically optimal number of writes | |||
| Selection sort | No | Selection | Its stability depends on the implementation. Used to sort this table in Safari or other Webkit web browser [2]. | ||||
| Bubble sort | Yes | Exchanging | Tiny code | ||||
| Merge sort | Depends | Yes | Merging | Used to sort this table in Firefox [3]. | |||
| Quicksort | Depends | Partitioning | Can be implemented as a stable sort depending on how the pivot is handled. Naïve variants use |
Thursday, November 25, 2010
Sorting
from wikipedia:
Saturday, November 13, 2010
Quotes
Tuesday, October 26, 2010
Design Patterns
- Creational patterns Abstract Factory
Builder
Factory method
Prototype
Singleton ( + Double-Check Singleton )
- Structural patterns Adapter
Bridge
Composite
Decorator
Facade
Flyweight
Proxy
- Behavioral patterns Chain of responsibility
Command
Interpreter
Iterator
Mediator
Memento
Observer
State
Strategy
Template method
Visitor
Monday, October 4, 2010
Drupal Survival Kit
To make Drupal content private:
http://www.fbloggs.com/2009/06/11/how-to-make-content-private-in-drupal/
.
http://www.fbloggs.com/2009/06/11/how-to-make-content-private-in-drupal/
.
Tuesday, September 21, 2010
ovh google apps
Erreur du type:
"Ajouter un champ MX dans la zone DNS"
"Utilisez la section (email) pour modifier les champs MX"
Voici comment saisir les données MX:
"Ajouter un champ MX dans la zone DNS"
"Utilisez la section (email) pour modifier les champs MX"
Voici comment saisir les données MX:
Monday, July 5, 2010
RestEasy: JBoss project
RestEasy is a JBoss project that helps you build RESTful Web Services. It is JAX-RS compliant (Java API for RESTful Web Services).
It is designed for JBoss but I am actually using it with tomcat only. It is very easy to use in an Eclipse project. You can use:
JAX-RS Hello World with RESTEasy
.
It is designed for JBoss but I am actually using it with tomcat only. It is very easy to use in an Eclipse project. You can use:
JAX-RS Hello World with RESTEasy
.
Monday, June 28, 2010
Complexity of basic STL containers
| \ | . | possible implementation | insert/remove at the beginning | insert/remove at the end | find |
| vector | sequence, key not unique, back-insertion | dynamic array (malloc) | o(n) | o(1) | o(1) (operator[]) o(n) (iter or algo) |
| list | sequence, key not unique | doubly-linked list | o(1) | o(1) | o(n) (iter or algo) |
| set | sorted associative container, key unique | sorted tree | o(log(n)) | o(log(n)) | o(log(n)) |
| map | sorted associative container, key unique | sorted tree | o(log(n)) | o(log(n)) | o(log(n)) |
| hash_map | hashed associative container, key unique | hashmap | o(1) | o(1) | o(1) |
Notes:
- for insert/remove in list, assumes we have the iterator at the right position
- no push_back on associative containers
| \ | . | possible implementation | insert/remove at the beginning | insert/remove at the end | find |
| deque | sequence, key not unique o(n) in the middle | dynamic array or doubly-linked list | o(1) | o(1) | o(n) |
| slist | sequence, key not unique, single direction iterator, front-insertion | single-linked list | o(1) | o(n) o(1) if insert_after | o(n) |
1. vector
2. deque
3. list
4. slist
5. bit_vector
1. set
2. map
3. multiset
4. multimap
5. hash_set
6. hash_map
7. hash_multiset
8. hash_multimap
1. stack (LIFO)
2. queue (FIFO)
3. priority_queue
.
Subscribe to:
Posts (Atom)
