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

[LeetCode]Palindrome Number解析

链接:https://leetcode.com/problems/palindrome-number/#/description难度:Easy题目:9.Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative int....

文章 2016-10-24 来自:开发者社区

[LeetCode]--17. Letter Combinations of a Phone Number

Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit strin...

文章 2016-10-18 来自:开发者社区

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

文章 2016-10-17 来自:开发者社区

[LeetCode]--374. Guess Number Higher or Lower

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 is higher o...

文章 2016-10-14 来自:开发者社区

[LeetCode]--263. Ugly Number

Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since i.....

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

[LeetCode]--202. Happy Number

Write an algorithm to determine if a number is “happy”. A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares .....

文章 2016-10-09 来自:开发者社区

[LeetCode]--191. Number of 1 Bits

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 000000000.....

文章 2016-10-07 来自:开发者社区

[LeetCode]--171. Excel Sheet Column Number

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 ... Z -> 26 AA ...

文章 2016-10-05 来自:开发者社区

[LeetCode]--136. 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 using extr...

文章 2016-09-29 来自:开发者社区

[LeetCode]--9. Palindrome Number

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

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

算法编程

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

+关注