Wednesday, September 30, 2015
Tuesday, September 29, 2015
The command pattern is used to create objects which encapsulate behaviours and states. This pattern is frequently needed when we want to delegate a sequence of calls with no need of explicitly knowing the parameter details or the specific methods here involved.
Monday, September 28, 2015
Saturday, September 26, 2015
The Iterator pattern is used to access all the elements of an object without exposing its internal representation. This pattern is commonly used by libraries of containers such as the STL for decoupling accesses to a specific container from its implementation.
Pubblicato da codingplayground a 11:07 PM
Friday, September 25, 2015
The Mediator allows interactions among classes with loose coupling. Each class is not required to recognize too much details of the other classes logic, which is exposed only to the mediator. Objects are not required to communicate directly anymore but they leverage the mediator, thereby reducing the coupling effects.
Pubblicato da codingplayground a 11:08 PM
Thursday, September 24, 2015
The Observer pattern implements the publisher/subscriber interactions, where a number of registered observer objects are informed about events produced by the publishers. This pattern is frequently used for implementing a distributed event handling system and for windows systems.
Pubblicato da codingplayground a 11:09 PM
Wednesday, September 23, 2015
Monday, September 21, 2015
The template pattern allows the definition of algorithms skeleton as an abstract class, where subclasses have the responsibility of providing its concrete behaviour. The word template is not related to C++ templates.
Pubblicato da codingplayground a 11:11 PM
Sunday, September 20, 2015
Friday, September 18, 2015
Thursday, September 17, 2015
Monday, September 14, 2015
Sunday, September 13, 2015
Saturday, September 12, 2015
Friday, September 11, 2015
Given an array of integers where all the numbers are appearing twice find the only number which appears once
Pubblicato da codingplayground a 8:53 AM