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

[LeetCode] Number of Longest Increasing Subsequence 最长递增序列的个数

Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input: [1,3,5,4,7] Output: 2 Explanation: The two longest increasing subsequence are [1, 3, 4, 7] an....

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

[LeetCode] Binary Number with Alternating Bits 有交替位的二进制数

Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1: Input: 5 Output: True Explanation: The binary representatio....

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

[LeetCode] Number of Distinct Islands 不同岛屿的个数

Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edg...

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

[LeetCode] Palindrome Number 验证回文数字

Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the .....

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

[LeetCode] Single Number 单独的数字

Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without usi...

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

[LeetCode] Largest Number 最大组合数

Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: The result may b...

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

[LeetCode] Excel Sheet Column Number 求Excel表列序号

Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... ...

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

[LeetCode] Single Number II 单独的数字之二

Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it witho...

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

[LeetCode] Number of 1 Bits 位1的个数

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit integer ’11' has binary representation 0...

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

[LeetCode] Number of Islands 岛屿的数量

Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You ...

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

算法编程

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

+关注