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

[LeetCode] Find the Duplicate Number 寻找重复数

Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate element must exist. Assume that there i...

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

[LeetCode] Additive Number 加法数

Additive number is a positive integer whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the first two numbers, each subsequ...

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

[LeetCode] Create Maximum Number 创建最大数

Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of the two. The relat...

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

[LeetCode] Super Ugly Number 超级丑陋数

Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of sizek. For example, [1, 2, ...

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

[LeetCode] Number of Connected Components in an Undirected Graph 无向图中的连通区域的个数

Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected components in an undirected graph. Example 1: 0&nb...

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

[LeetCode] Number of Islands II 岛屿的数量之二

A 2d grid map of m rows and n columns is initially filled with water. We may perform an addLand operation which turns the water at position (row, col) into a land. Given ...

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

[LeetCode] Strobogrammatic Number 对称数

A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The number is represented as a....

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

[LeetCode] Strobogrammatic Number II 对称数之二

A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Find all strobogrammatic numbers that are of length = n. For example, Given n = 2, return&nbs...

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

[LeetCode] Strobogrammatic Number III 对称数之三

A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to count the total strobogrammatic numbers that exist in the range of low &a...

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

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

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

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

算法编程

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

+关注