文章 2017-12-13 来自:开发者社区

[LeetCode] Guess Number Higher or Lower II 猜数字大小之二

We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wrong, I'll tell you whether the number...

文章 2017-12-12 来自:开发者社区

[LeetCode] Convert a Number to Hexadecimal 数字转为十六进制

Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: All letters in hexadecimal (a-f) must be in lowercase. The hex...

文章 2017-12-12 来自:开发者社区

[LeetCode] Third Maximum Number 第三大的数

Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n). Example 1:...

文章 2017-12-12 来自:开发者社区

[LeetCode] Number of Boomerangs 回旋镖的数量

Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals the dista...

文章 2017-12-12 来自:开发者社区

[LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球

There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the horizontal diameter. Since it's horizontal, y-coordi....

文章 2017-12-11 来自:开发者社区

[LeetCode] Valid Number 验证数字

Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note:&nb...

文章 2017-12-10 来自:开发者社区

[LeetCode] Number of Segments in a String 字符串中的分段数量

Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string does not contain any non-printable chara...

文章 2017-12-10 来自:开发者社区

[LeetCode] 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 3.....

文章 2017-12-09 来自:开发者社区

[LeetCode] Perfect Number 完美数字

We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write a function that ret...

文章 2017-12-09 来自:开发者社区

[LeetCode] Complex Number Multiplication 复数相乘

Given two strings representing two complex numbers. You need to return a string representing their multiplication. Note i2 = -1 according to the definition. Example 1: Input: "1+1i", "1+1i" ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注