The way I see this problem is that it is EXACTLY the same as "Level-Order Traversal I" except that we need to reverse the final container for output, which is trivial. Is there a better idea that fits this problem specifically?

The attached is my current recursive solution. In each function call, we pass in the current node and its level. If this level does not yet exist in the output container, then we should add a new empty level. Then, we add the current node to the end of the current level, and recursively call the function passing the two children of the current node at the next level. This algorithm is really a DFS, but it saves the level information for each node and produces the same result as BFS would.

```
vector<vector<int> > res;
void DFS(TreeNode* root, int level)
{
if (root == NULL) return;
if (level == res.size()) // The level does not exist in output
{
res.push_back(vector<int>()); // Create a new level
}
res[level].push_back(root->val); // Add the current value to its level
DFS(root->left, level+1); // Go to the next level
DFS(root->right,level+1);
}
vector<vector<int> > levelOrderBottom(TreeNode *root) {
DFS(root, 0);
return vector<vector<int> > (res.rbegin(), res.rend());
}
```