Relative Content

Tag Archive for data-structures

Unit testing a text index

Consider a text index such as a suffix tree or a suffix array supporting Count queries (number of occurrences of a pattern) and Locate queries (the positions of all the occurrences of a pattern) over a given text. How would you go about unit testing such a class ?

Separating validation from persistence in models?

Models in an MVC application gets kind of hard to test when validation of data and persistence of data is baked together in the model. I would like to test those separately to prevent doing integration testing instead of actual unit testing.

Data structures for storing finger/stylus movements in drawing application?

I have a general question about creating a drawing application, the language could be C++ or ObjectiveC with OpenGL.
I would like to hear what are the best methods and practices for storing strokes data.
Think of the many iPad apps that allow you to draw with your finger (or a stylus) or any other similar function on a desktop app.

Count function on tree structure (non-binary)

I am implementing a tree Data structure in c# based (largely on Dan Vanderboom’s Generic implementation). I am now considering approach on handling a Count property which Dan does not implement.