snippets 0.1.0
|
#include <functional>
#include <vector>
#include <optional>
#include <queue>
#include <cassert>
#include <unordered_map>
Go to the source code of this file.
Classes | |
struct | hsc_snippets::TreeNode |
Namespaces | |
namespace | hsc_snippets |
Functions | |
static TreeNode * | hsc_snippets::new_binary_tree (const std::vector< std::optional< int > > v) |
static std::vector< std::optional< int > > | hsc_snippets::binary_tree_to_vector (TreeNode *root) |
static void | hsc_snippets::delete_binary_tree (TreeNode *root) |
static int | hsc_snippets::get_binary_tree_depth (TreeNode *root) |
static void | hsc_snippets::inorder (TreeNode *root, std::function< void(int)> func) |
static void | hsc_snippets::preorder (TreeNode *root, std::function< void(int)> func) |
static void | hsc_snippets::postorder (TreeNode *root, std::function< void(int)> func) |
static std::unordered_map< int, std::vector< int > > | hsc_snippets::binary_tree_to_adjacency_list (TreeNode *root) |