You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin ...
分类:
其他好文 时间:
2019-03-11 11:54:35
阅读次数:
186
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line ...
分类:
其他好文 时间:
2019-03-10 22:21:51
阅读次数:
217
leetcode4 此题归在二分法中: 大概思想:将两个数组分别分为两个部分,两者的数值较小的数字,就是合并后数组的前半部分 难点在:找到第一个数组的位置i,则第二数组的位置j = (m+n +1)/2 - i; 此后,由i,j找到中位数,如果m+n为奇数,则max_left即为所求,否则:(max ...
分类:
其他好文 时间:
2019-03-09 01:04:28
阅读次数:
199
题目 链接: "https://leetcode.com/problems/image overlap/" Level: Medium Discription: Two images A and B are given, represented as binary, square matrices ...
分类:
其他好文 时间:
2019-03-08 23:52:14
阅读次数:
270
全世界最笨的人 出现了 这题真的好欺骗我的感情,表面上先给我过了,让我快乐一下,背地里再把我给踢掉 TUT干嘛这么坏啊!!!!!!!!!!!!! 好吧,其实这个错误昨天晚上就反过了 但是世界上最笨的女同学她是不会改的 如果你下次还不改 那你还是世界上最笨的女同学 如果你改了 那你...... TUT ...
分类:
其他好文 时间:
2019-03-08 23:19:29
阅读次数:
235
Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we thin ...
分类:
其他好文 时间:
2019-03-08 17:14:02
阅读次数:
167
JOINs in CDS View In ABAP CDS, Join between two data sources is allowed. Allowed joins are:- Inner Join/Join Left Outer Join Right Outer Join The post ...
分类:
其他好文 时间:
2019-03-08 16:58:11
阅读次数:
180
思路:这道题让我们求两数相除,而且规定我们不能用乘法,除法和取余操作,那么我们还可以用另一神器 位操作Bit Operation ,思路是,如果被除数大于或等于除数,则进行如下循环,定义变量t等于除数,定义计数p,当t的两倍小于等于被除数时,进行如下循环,t扩大一倍,p扩大一倍,然后更新res和m。 ...
分类:
其他好文 时间:
2019-03-08 11:20:45
阅读次数:
196
选择结构 单分支选择结构 语法 if 表达式: 语句块 当表达式值为True时,表达式满足,语句块执行,否则不执行 >>> x = input('Input two numbers:')Input two numbers:23 44>>> a,b = map(int,x.split())>>> if ...
分类:
其他好文 时间:
2019-03-05 23:08:17
阅读次数:
266