BlackBerry interview question

Some basic string algorithms.