- 博客(24)
- 资源 (5)
- 问答 (7)
- 收藏
- 关注
原创 Leetcode 1028. Convert to Base -2
Given a numberN, return a string consisting of"0"s and"1"sthat represents its value in base-2(negative two).The returned string must have no leading zeroes, unless the string is"0".Exam...
2019-03-31 18:05:14 285
原创 Leetcode 1030. Next Greater Node In Linked List
We are given a linked list withheadas the first node. Let's number thenodes in the list:node_1, node_2, node_3, ...etc.Each node may have anext largervalue: fornode_i,next_larger(node_i)...
2019-03-31 13:32:16 253
原创 Leetcode 1029. Binary Prefix Divisible By 5
Given an arrayAof0s and1s, considerN_i: the i-th subarray fromA[0]toA[i]interpretedas a binary number (from most-significant-bit to least-significant-bit.)Return a list of booleansanswer...
2019-03-31 13:31:20 313
原创 Leetcode 114. Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example, given the following tree: 1 / \ 2 5 / \ \3 4 6The flattened tree should look like:1 \ 2 \ ...
2019-03-30 16:32:20 175
原创 Leetcode 476. Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the range of a ...
2019-03-30 14:20:25 155
原创 极客时间Java专栏
&&第一课 Java平台Java是解释执行吗?--不准确,Javac编译成字节码属于解释执行,但Hotspot的JVM提供了JIT编译器,能在运行时将热点代码编译成机器码,这情况下热点代码属于编译执行.###对于笼统的问题,要尽量表现出自己的思维深入并系统化,要避免让面试官觉得你是个"知其然不知所以然"的人.开放性问题,考察的是多方面的,很多面试者都会在这种问题上吃亏...
2019-03-25 11:55:50 665
原创 Java锁机制
PART ONE--对象锁,一个人物可以多次获得对象的锁.JVM负责跟踪对象被枷锁的次数.--类锁,synchronized static方法可以在类的范围内防止对static数据的并发访问.--Brian同步规则: --如果正在写一个变量,她可能接下来被另一个线程读取 --或者正在读取一个上一次已经被另一个线程写过的变量 --读写线程都必须使用相同的监视器锁同...
2019-03-25 11:53:50 251
原创 Leetcode 141. Linked List Cycle
Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integerposwhich represents the position (0-indexed)in the linked list where tail c...
2019-03-24 22:03:29 145
原创 1023. Binary String With Substrings Representing 1 To N
Given a binary stringS(a string consisting only of '0' and '1's) and a positive integerN, return true if and only if for every integer X from 1 to N, the binary representation of X is a substring ...
2019-03-24 11:11:05 396
原创 英语流利说20190317 | 美国睡眠研究:周末补觉,补不回一周的睡眠债
Weekend 'catch-up sleep' is a lieThe negative health effects of skimping on sleep during the week can't be reversed by marathon weekend sleep sessions, according to a sobering new study.Despit...
2019-03-17 23:53:51 1448
原创 Leetcode 101. Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree[1,2,2,3,4,4,3]is symmetric: 1 / \ 2 2 / \ / \3 4 4 3...
2019-03-17 23:47:13 136
原创 Leetcode 1013. Pairs of Songs With Total Durations Divisible by 60
In a list of songs, thei-thsong has a duration oftime[i]seconds.Return the number of pairs of songs for which their totalduration in seconds is divisible by60. Formally, we want the number ...
2019-03-17 22:29:33 203
原创 Leetcode 1012. Complement of Base 10 Integer
Every non-negative integerNhas a binary representation. For example,5can be represented as"101"in binary,11as"1011"in binary, and so on. Note that except forN = 0, there are no leading z...
2019-03-17 12:16:34 184
原创 Leetcode 400. Nth Digit
Find thenthdigit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...Note:nis positive and will fit within the range of a 32-bit signed integer (n< 231).Example 1:Inp...
2019-03-16 00:51:17 133
原创 3700万患者的曙光:第二例艾滋治愈病例或诞生
London HIV patient's remission spurs hope for curing AIDSremission, n.缓解,暂时康复spur, v.促进,激励A stem-cell treatment put a London cancer patient's HIV into remission, marking the second such reporte...
2019-03-14 00:03:43 326
原创 英语流利说20190312 | 在科技跑道上,美国大学或失去关键优势
In tech race with China, U.S. universities may lose a vital edgeedge, n.优势The U.S. is still out in front of global rivals when it comes to innovation, but American universities -- where new idea...
2019-03-13 00:15:21 856
原创 Leetcode 438. Find All Anagrams in a String
Given a stringsand anon-emptystringp, find all the start indices ofp's anagrams ins.Strings consists of lowercase English letters only and the length of both stringssandpwill not be larg...
2019-03-12 23:43:30 312 1
原创 Leetcode 1005. Maximize Sum Of Array After K Negations
Given an arrayAof integers, wemustmodify the array in the following way: we choose aniand replaceA[i]with-A[i], and we repeat this processKtimes in total. (We may choose the same indexi...
2019-03-10 12:58:32 290
原创 URI is not registered
cannot resolve method setPositiveButtonjava.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlin....
2019-03-09 23:47:48 446
原创 Android dependency '..' has different version for the compile (..) and runtime (..) classpath
报错详情Android dependency '..' has different version for the compile (..) and runtime (..) classpath解决方式把 implementation 这个依赖的方式改为 api 然后重新 rebuild 就好了分析原因todo...
2019-03-08 10:20:07 678
原创 OutOfMemoryError
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':common:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(Exe...
2019-03-06 14:07:01 445
原创 Leetcode 1003. Check If Word Is Valid After Substitutions
We are given that the string"abc"is valid.From any valid stringV, we may splitVinto two piecesXandYsuch thatX + Y(Xconcatenated withY) is equal toV. (XorYmay be empty.) Then,X + ...
2019-03-03 12:24:51 380
原创 Leetcode 1002. Find Common Characters
Given an arrayAof strings made only from lowercase letters, return a list of all characters that show up in all strings within the list(including duplicates).For example, if a character occurs 3...
2019-03-03 12:23:42 683
腾讯TBS是否支持docx, xlsx等格式?
2019-06-11
Android MVVM中如何使用三目运算符在运行时设置图片资源?
2019-01-14
Android Framework如何深入学习?
2019-01-11
Android Runtime和虚拟机之间是什么关系?
2019-01-11
如何深入了解一个开源库?
2018-11-29
Android执行下载任务是否需要Service?
2018-11-24
下面这段代码的两个同步怎么理解?
2016-11-05
TA创建的收藏夹 TA关注的收藏夹
TA关注的人