码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
[LeetCode]Sort Colors
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integer...
分类:其他好文   时间:2015-04-06 11:29:06    阅读次数:121
Dijkstra
1 program dijkstra; 2 var 3 a:array[1..100,1..100]of integer; 4 flag:array[1..100]of boolean; 5 w,x,n,i,j,min,minn:integer; 6 begin 7 ...
分类:其他好文   时间:2015-04-06 06:12:04    阅读次数:139
【leetcode】Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in...
分类:其他好文   时间:2015-04-05 23:20:17    阅读次数:177
Leetcode: Reverse Integer 正确的思路下-要考虑代码简化
题目:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ...
分类:其他好文   时间:2015-04-05 21:47:56    阅读次数:145
LightOJ 1300 Odd Personality
Odd PersonalityTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onLightOJ. Original ID:130064-bit integer IO format:%lld Java class ...
分类:其他好文   时间:2015-04-05 20:27:55    阅读次数:164
LeetCode Search a 2D Matrix
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer of each...
分类:其他好文   时间:2015-04-05 17:33:31    阅读次数:125
LeetCode12~14 Integer to Roman/Roman to Integer/Longest Common Prefix
一:Integer to Roman 题目: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 链接:https://leetcode.com/problems/integer-to-roman/ 分析:此题...
分类:其他好文   时间:2015-04-05 16:02:09    阅读次数:156
LightOJ 1291 Real Life Traffic
Real Life TrafficTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onLightOJ. Original ID:129164-bit integer IO format:%lld Java clas...
分类:其他好文   时间:2015-04-05 15:59:33    阅读次数:154
String to Integer (atoi)
class Solution {public: int atoi(string str) { long long result=0; int flag=1; int i=0; while(str[i]==' '&&str[i]!='\0'...
分类:其他好文   时间:2015-04-05 15:56:47    阅读次数:116
LightOJ 1063 Ant Hills
Ant HillsTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onLightOJ. Original ID:106364-bit integer IO format:%lld Java class name:M...
分类:其他好文   时间:2015-04-05 15:46:45    阅读次数:182
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!