Dropbox interview question

Depth-first search to find all elements in a DOM tree with a given class.