帅可儿
帅可儿
全部文章
分类
归档
标签
去牛客网
登录
/
注册
帅可儿的博客
全部文章
(共4篇)
题解 | 判断是不是平衡二叉树
#include <unordered_map> class Solution { unordered_map<TreeNode*, int>hash; public: //思想就是如果当前节点不为空就判断这课数左右高度差是否小于等于1,然后再判断他们子树是否...
2025-05-28
0
27
题解 | #数组中出现次数超过一半的数字#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param numbers int整型vector * @return int整型 ...
2024-08-03
0
74
题解 | #扭蛋机#
#include <stdio.h> void fuc(int a){ if(a==0) return ; if(a%2==1){ fuc((a-1)/2); printf("2"); } ...
2024-02-05
0
126
题解 | #两个整数二进制位不同个数#
#include <stdio.h> int main() { int a, b,c=0; while (scanf("%d %d", &a, &b) != EOF) { // 注意 while 处理多个 case i...
2024-02-05
0
92