mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 06:07:20 +08:00 
			
		
		
		
	fix some bugs in c codes (#1089)
This commit is contained in:
		@ -6,7 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "../utils/common.h"
 | 
					#include "../utils/common.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* 二叉搜索树你结构体 */
 | 
					/* 二叉搜索树结构体 */
 | 
				
			||||||
typedef struct {
 | 
					typedef struct {
 | 
				
			||||||
    TreeNode *root;
 | 
					    TreeNode *root;
 | 
				
			||||||
} BinarySearchTree;
 | 
					} BinarySearchTree;
 | 
				
			||||||
 | 
				
			|||||||
@ -25,7 +25,7 @@ void testTreeNode() {
 | 
				
			|||||||
    printTree(root);
 | 
					    printTree(root);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // tree to arr
 | 
					    // tree to arr
 | 
				
			||||||
    int *arr = treeToArray(root, size);
 | 
					    int *arr = treeToArray(root, &size);
 | 
				
			||||||
    printArray(arr, size);
 | 
					    printArray(arr, size);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user