上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 49 下一页

2015年1月20日

Permutation Sequence

摘要: The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie... 阅读全文

posted @ 2015-01-20 16:11 luckygxf 阅读(168) 评论(0) 推荐(0)

Rotate List

摘要: Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.这道题有点... 阅读全文

posted @ 2015-01-20 11:16 luckygxf 阅读(224) 评论(0) 推荐(0)

2015年1月19日

Unique Paths II

摘要: Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i... 阅读全文

posted @ 2015-01-19 21:42 luckygxf 阅读(151) 评论(0) 推荐(0)

Unique Paths

摘要: A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ... 阅读全文

posted @ 2015-01-19 20:37 luckygxf 阅读(201) 评论(0) 推荐(0)

Integer to Roman

摘要: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999. 1 public class Solution { 2 public Stri... 阅读全文

posted @ 2015-01-19 20:02 luckygxf 阅读(135) 评论(0) 推荐(0)

2015年1月18日

Search for a Range

摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文

posted @ 2015-01-18 16:08 luckygxf 阅读(174) 评论(0) 推荐(0)

Next Permutation

摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl... 阅读全文

posted @ 2015-01-18 15:37 luckygxf 阅读(165) 评论(0) 推荐(0)

2015年1月16日

Divide Two Integers

摘要: 参考:http://www.cnblogs.com/springfor/p/3871008.htmlDivide two integers without using multiplication, division and mod operator.If it is overflow, retur... 阅读全文

posted @ 2015-01-16 15:48 luckygxf 阅读(147) 评论(0) 推荐(0)

java 判断两个数是否异号

摘要: java 整型int占4个字节32位,两个数异或后移动31位判断结果,如果是1则异号,如果是0则同号 1 public class ShowEnviromentViarible { 2 3 public static void main(String[] args) { 4 ... 阅读全文

posted @ 2015-01-16 12:27 luckygxf 阅读(1631) 评论(0) 推荐(0)

字节顺序的详细解释(转)

摘要: 原出处:http://blog.csdn.net/yingfox/article/details/1831848一、基本概念位的概念:在计算机中,一个0或1称为一位(bit)。字节:连续的八位称为一个字节(Byte),字节是计算机中可单独处理的最小单位。即以字节为基本单位来解释信息,规定1个字节是8... 阅读全文

posted @ 2015-01-16 09:36 luckygxf 阅读(3508) 评论(0) 推荐(0)

上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 49 下一页

导航