09 2021 档案

摘要:110.平衡二叉树 题目链接 给定一个二叉树,判断它是否是高度平衡的二叉树。 本题中,一棵高度平衡二叉树定义为: 一个二叉树每个节点 的左右两个子树的高度差的绝对值不超过 1 。 思路 递归三要素 确定参数和返回值 递归中止条件 递归逻辑部分 二叉树的深度优先遍历 二叉树的深度优先遍历有左中右三种, 阅读全文 »
posted @ 2021-09-26 23:51 -Rocky- 阅读(71) 评论(0) 推荐(1) 编辑
摘要:Main Menu 所在位置, 当Main Menu被隐藏后, 意味着无法从Main Menu上方点击进行恢复。 隐藏前 隐藏后 恢复 双击shift键打开搜索功能, 然后输入main menu, 显示操作区域,第一个可以打开隐藏前的视图,第二个点击可以直接控制关闭/开启 阅读全文 »
posted @ 2021-09-08 14:09 -Rocky- 阅读(308) 评论(0) 推荐(0) 编辑
摘要:继承Thread方法 start方法只能调用一次 run方法自动调用不能手动 public class MyThread extends Thread { @Override public void run(){ for(int i=0;i<10000;i++){ try { Thread.slee 阅读全文 »
posted @ 2021-09-07 13:24 -Rocky- 阅读(72) 评论(0) 推荐(0) 编辑
摘要:要求 指定数组中两数之和与目标值相等 示例: {1,2,3,4,5},目标值 5 程序返回结果的下标[1,2] 代码 public class Solution1 { public int[] twoSum(int[] nums, int target) { HashMap<Integer,Inte 阅读全文 »
posted @ 2021-09-07 13:20 -Rocky- 阅读(35) 评论(0) 推荐(0) 编辑
摘要:1.说明: public class BitmapFactory extends Object//继承 java.lang.Object ↳android.graphics.BitmapFactory Creates Bitmap objects from various sources, incl 阅读全文 »
posted @ 2021-09-05 17:09 -Rocky- 阅读(104) 评论(0) 推荐(0) 编辑
摘要:1 建表语句 create table person ( pid varchar(18), name varchar(20) not null, age number(3) not null check(age between 0 and 150), birthday date, sex varch 阅读全文 »
posted @ 2021-09-05 17:07 -Rocky- 阅读(5806) 评论(0) 推荐(1) 编辑
摘要:atoi函数的实现-java 要求:输入字符串,提取最前面的数字部分,并转换为int型 示例:" -42 world" 输出:-42 代码思路: 先提取出-42,在转换-42为int,并判断范围 public int myAtoi(String str){ //提取的数字字符串 StringBuil 阅读全文 »
posted @ 2021-09-05 17:07 -Rocky- 阅读(113) 评论(0) 推荐(0) 编辑
摘要:10.正则表达式匹配 要求:给定一个字符串 (s) 和一个字符模式 (p)。实现支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符。 '*' 匹配零个或多个前面的元素 示例: 输入: s = "mississippi" p = "mis*is*p*." 输出: false 代码思 阅读全文 »
posted @ 2021-09-05 17:06 -Rocky- 阅读(172) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<stack> #include<string> #include<stdlib.h> using namespace std; //23+(34*45)/(5+6+7) //2+3*5+6+7 int priority(char c) { if 阅读全文 »
posted @ 2021-09-05 17:01 -Rocky- 阅读(147) 评论(0) 推荐(0) 编辑
摘要:模拟20秒的输出结果 模拟开始 初始化用户: 普通客户 进入排队, 编号:1000 VIP客户 进入排队, 编号:1001 普通客户 进入排队, 编号:1002 普通客户 进入排队, 编号:1003 VIP客户 进入排队, 编号:1004 VIP客户 进入排队, 编号:1005 VIP客户 进入排队 阅读全文 »
posted @ 2021-09-05 16:59 -Rocky- 阅读(1390) 评论(2) 推荐(0) 编辑
摘要:main.cpp #include<iostream> #include"Scheduling.h" using namespace std; int main() { Scheduling scheduling; scheduling.simulate(); } Scheduling.h #inc 阅读全文 »
posted @ 2021-09-05 16:57 -Rocky- 阅读(126) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示