In CS2 courses centering programming with recursion and data structures, binary trees can be used to represent hierarchical relationships between data. Drawing on a machine learning context, this assignment presents an application of binary trees toward text classification that demonstrates how the design of programming abstractions shapes social outcomes. By the end of this assignment, students will not only be able to define methods that recursively construct, traverse, and modify binary trees, but also begin to engage with ethical questions around the design and use of sociotechnical text classification systems.
Educational-resources Downloads
This zip contains the supplemental materials for this article.
Recommendations
An immediate approach to balancing nodes in binary search trees
We present an immediate approach in hoping to bridge the gap between the difficulties of learning ordinary Binary Search Trees (henceforth BST) and their height-balanced variants in the typical data structures class. For each node in the tree, instead ...
Rank-Balanced Trees
Since the invention of AVL trees in 1962, many kinds of binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the ...
Multidimensional Binary Search Trees in Database Applications
The multidimensional binary search tree (abbreviated k-d tree) is a data structure for storing multikey records. This structure has been used to solve a number of "geometric" problems in statistics and data analysis. The purposes of this paper are to ...