aboutsummaryrefslogtreecommitdiff
path: root/leetcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'leetcode.h')
-rw-r--r--leetcode.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/leetcode.h b/leetcode.h
index c881193..6cdd131 100644
--- a/leetcode.h
+++ b/leetcode.h
@@ -57,11 +57,23 @@ struct TreeNode {
struct TreeNode *right;
};
+struct Node {
+ int val;
+ int numChildren;
+ struct Node **children;
+};
+
struct ListNode *listnode_create(int val);
void listnode_print(struct ListNode *head);
+void listnode_free(struct ListNode *head);
struct TreeNode *treenode_create(int val);
void treenode_print(struct TreeNode *root);
+void treenode_free(struct treeTreeNode *root);
+
+struct Node *node_create(int val, int numChildren);
+void node_print(struct Node *root, int depth);
+void node_free(struct Node *root);
#define IS_ARRAY(value) \
(!__builtin_types_compatible_p(typeof((value)), typeof(&(value)[0])))