State Design Pattern
- Details
- Hits: 1573
"The state design pattern allows for full encapsulation of an unlimited number of states on a context for easy maintenance and flexibility."
Prototype Pattern
- Details
- Hits: 1254
It is used in scenarios where application needs to create a number of instances of a class, which has almost same state or differs very little.
Abstract Factory
- Details
- Hits: 6300
Provide an interface for creating dependent objects without specifying their concrete classes.
Binary Search Tree
- Details
- Hits: 1301
The Binary Search Tree is a data structure that store "items" (such as numbers, names etc.) in memory.
TreeSet
- Details
- Hits: 1320
It is based on TreeMap
, the main different is that TreeSet
is an implementation of Set
interface and TreeMap
on Map
interface.
This kind of collection sorts your entries just when they are inserted. No need to call sort()
.
The Accountant
- Details
- Hits: 2732
Recently, I participate in the awesome coding contest The Accountant in CodinGames. This contest was a 2-week optimization challenge, where it was not necessary to succeed all of the given test cases to have a good score. Unfortunately, I didn't use the 2 week because I was travelling. I only used 5 days.
It was my second time in this kind of contests, and I finished in the position 1774/6214 ( you can see the report in The Accountant report for my user cguzman ). Not so bad for a second time :)
I am not an expert in Genetic Algorithm (GA), but I decided to implement one for this solution. Thus, now I will explain how was my approach for this challenged.
Trie
- Details
- Hits: 2576
The Trie is an ordered tree data structure used usually to store strings, in which case each node defines an association with a letter of the alphabet. Unlike a binary search tree, no node in the tree stores the key associated with that node; instead, its position in the tree defines the key with which it is associated.
Builder pattern
- Details
- Hits: 1194
Builder pattern is an alternative way to construct complex objects and should be used only when the increase of object constructor parameter combination leads to an exponential list of constructors. Instead of using numerous constructors, the builder pattern uses another object, a builder, that receives each initialization parameter step by step and then returns the resulting constructed object at once.