| 1 | template <class T> |
| 2 | struct dancing_links { |
| 3 | struct node { |
| 4 | T item; |
| 5 | node *l, *r; |
| 6 | node(const T &_item, node *_l = NULL, node *_r = NULL) |
| 7 | : item(_item), l(_l), r(_r) { |
| 8 | if (l) l->r = this; |
| 9 | if (r) r->l = this; } }; |
| 10 | node *front, *back; |
| 11 | dancing_links() { front = back = NULL; } |
| 12 | node *push_back(const T &item) { |
nothing calls this directly
no outgoing calls
no test coverage detected