码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
LeetCode38.报数
报数序列是一个整数序列,按照其中的整数的顺序进行报数,得到下一个数。其前五项如下: 1 被读作 "one 1" ("一个一") , 即 11。11 被读作 "two 1s" ("两个一"), 即 21。21 被读作 "one 2", "one 1" ("一个二" , "一个一") , 即 1211。 ...
分类:其他好文   时间:2018-10-11 12:55:40    阅读次数:131
[LeetCode] 167. Fraction to Recurring Decimal 分数转循环小数
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating ...
分类:其他好文   时间:2018-10-11 10:24:24    阅读次数:138
CF912E Prime Gift(Meeting In The Middle+Two pointers)
原题 挂个链接 "CodeForces" 题目大意:给定k个质数,求出约数中只有由这几个数组合一下(可以多次用一个数)的第k个值 Solution 分析: 我们看到n是16,然后如果爆搜n/2是可以过的.所以考虑Meeting In The Middle 他让我们求第k个数,理所应当地想到二分答案. ...
分类:其他好文   时间:2018-10-11 00:00:36    阅读次数:226
Two ways to invert a string
字符串反转的两种方式 ...
分类:其他好文   时间:2018-10-09 18:10:52    阅读次数:145
29. Divide Two Integers
Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividi ...
分类:其他好文   时间:2018-10-08 23:13:42    阅读次数:140
HTML5框架Frameset的使用
框架的使用其实就是给你当前的屏幕划分行或者列,下面记录一下基本的使用。 我用到了四个页面,其中的one.html,two.html,three.html三个页面是用来显示在index.html页面中的 三个子页面的代码都只有一行,比较简单,不列出。 下面是index.html页面的代码: 注意点:使 ...
分类:Web程序   时间:2018-10-08 17:16:05    阅读次数:179
【leetcode答案】两数之和(two sum)
解题思路: 如题所示:本题给定的是一个数组,我们要知道的是数组的长度nums.length,还有一个目标数字,目的是遍历数组中的数,任意两数相加之和等于目标数字。 我们可以先遍历数组中,每两个数字相加,如果相加的和等于目标数的话,那么它们的索引便是我们要的答案,我们可以先新开一个空的数组,然后把该索 ...
分类:其他好文   时间:2018-10-07 23:19:56    阅读次数:183
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:其他好文   时间:2018-10-07 19:47:09    阅读次数:149
动手动脑(一)
一, 代码: public class EnumTest {private enum MyEnum{ ONE, TWO, THREE} public static void main(String[] args) { for(MyEnum value:MyEnum.values()){ System ...
分类:其他好文   时间:2018-10-07 19:46:02    阅读次数:143
[LeetCode&Python] Problem 617. Merge Two Binary Trees
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n ...
分类:编程语言   时间:2018-10-07 14:44:22    阅读次数:133
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!