摘要: typedef struct TreeNode TreeNode; struct TreeNode* mirrorTree(struct TreeNode* root){ // recursion resolution if (root == NULL) return NULL; TreeNode 阅读全文
posted @ 2020-08-23 22:06 温暖了寂寞 阅读(69) 评论(0) 推荐(0) 编辑
摘要: bool findNumberIn2DArray(int** matrix, int matrixSize, int* matrixColSize, int target){ if (matrixSize == 0 || *matrixColSize == 0) { return false; } 阅读全文
posted @ 2020-08-23 19:07 温暖了寂寞 阅读(176) 评论(0) 推荐(0) 编辑
摘要: int hammingWeight(uint32_t n) { int res = 0; while (n != 0) { n = n & (n - 1); res++; } return res; } 阅读全文
posted @ 2020-08-23 18:35 温暖了寂寞 阅读(135) 评论(0) 推荐(0) 编辑
摘要: int count = 0; void func(int** arr,int* hash,struct TreeNode* node,int row) { row++; if (hash[row] == 0) //如果该行列数为0 那证明是当前遍历到的是该行第一个数(空值已经排除) { count+ 阅读全文
posted @ 2020-08-23 17:51 温暖了寂寞 阅读(160) 评论(0) 推荐(0) 编辑