FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
binary_trees/0-binary_tree_node.c at main · husamql3/binary_trees · GitHub
husamql3
/
binary_trees
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
binary_trees
/
0-binary_tree_node.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (18 loc) · 555 Bytes
Breadcrumbs
binary_trees
/
0-binary_tree_node.c
Copy path
File metadata and controls
22 lines (18 loc) · 555 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include
"binary_trees.h"
/**
* binary_tree_node - Creates a binary tree node.
* @parent: A Pointer to the parent node of the node to create.
* @value: The value to put in the new node.
* Return: A pointer to the new node, or NULL on failure.
**/
binary_tree_t
*
binary_tree_node
(
binary_tree_t
*
parent
,
int
value
)
{
binary_tree_t
*
newNode
=
(
binary_tree_t
*
)
malloc
(
sizeof
(
binary_tree_t
));
if
(
newNode
==
NULL
)
return
(
NULL
);
newNode
->
n
=
value
;
newNode
->
parent
=
parent
;
newNode
->
left
=
NULL
;
newNode
->
right
=
NULL
;
return
(
newNode
);
}
Back
|
FazBrowse Home
|
New Git URL