Category: data structure
Delphi has moved to the era of Unicode. From Delphi 2009, the string type is in fact a UnicodeString instead of AnsiString. How is this going to affect the project migration? I have a ongoing …
The Dictionary is an important data-structure and is a very handy tool to store a collection of key-value pairs. The Dictionary object can be created easily using Scripting language …
Disjoint Sets is one of the most powerful and yet simple data structure. The idea of Disjoint Sets can be perfectly applied in finding the minimal spanning tree. The …
The Iterator is an interface for external iterators or objects that can be iterated themselves internally. In PHP, it is defined as follows. Iterator extends Traversable { /* Methods …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/137/B It took me several attempts to get it right for this problem although it is not difficult. The problem is find out how …