Live2D

08 2021 档案

摘要:新知识-Queue(FIFO) FIFO:First in First out; 队列:先进先出 入队和出队。入队会向队列追加一个新元素,而出队会删除第一个元素,一个索引来指出起点。 代码: /** ... 动态数组和指向起点的标志位*/ class MyQueue { // store eleme 阅读全文
posted @ 2021-08-12 17:00 饭耶 阅读(161) 评论(1) 推荐(0)
摘要:新知识-valueOf(Leetcode 1556_千位分割符) 1556.千位分隔数 代码 class Solution { public String thousandSeparator(int n) { StringBuilder sb = new StringBuilder(String.v 阅读全文
posted @ 2021-08-11 18:05 饭耶 阅读(222) 评论(0) 推荐(0)
摘要:新知识-位运算 &、|、^、~、>>、<< 计算机对二进制位数进行的运算(+-*/),符号位共同参与运算。 按位与运算符(&) (*)两个1才为1,出0则0; 负数先进行补码转换再进行与运算 清零:将某数清零,将其所有位数与0相与,结果为0; 取指定位 比如10110010想取其后四位,只需要将其与 阅读全文
posted @ 2021-08-11 16:18 饭耶 阅读(137) 评论(0) 推荐(0)
摘要:##力扣205题——同构字符串 ##代码 class Solution { public boolean isIsomorphic(String s, String t) { HashMap<Object,Integer> map= new HashMap(); Integer i = 0; for 阅读全文
posted @ 2021-08-10 18:01 饭耶 阅读(151) 评论(0) 推荐(0)
摘要:##197截图 ##datediff代码 select w1.id from Weather w1, Weather w2 where datediff(w1.recorddate,w2.recorddate)=1 and w1.Temperature>w2.Temperature; ##dated 阅读全文
posted @ 2021-08-09 17:14 饭耶 阅读(70) 评论(1) 推荐(0)