上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 43 下一页

2015年10月3日

61. Rotate List(List)

摘要: Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->... 阅读全文

posted @ 2015-10-03 10:57 joannae 阅读(143) 评论(0) 推荐(0) 编辑

92. Reverse Linked List II (List)

摘要: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2 阅读全文

posted @ 2015-10-03 10:36 joannae 阅读(170) 评论(0) 推荐(0) 编辑

86. Partition List (List)

摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o... 阅读全文

posted @ 2015-10-03 10:29 joannae 阅读(135) 评论(0) 推荐(0) 编辑

148. Sort List (List)

摘要: Sort a linked list in O(n log n) time using constant space complexity. 法I:快排。快排的难点在于切分序列。从头扫描,碰到>=target的元素,停止;从第二个字串扫描,碰到<=target的元素停止;交换这两个元素。这样的好处是 阅读全文

posted @ 2015-10-03 09:41 joannae 阅读(177) 评论(0) 推荐(0) 编辑

147. Insertion Sort List (List)

摘要: Sort a linked list using insertion sort. 阅读全文

posted @ 2015-10-03 09:39 joannae 阅读(145) 评论(0) 推荐(0) 编辑

128. Longest Consecutive Sequence (HashTable)

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The long 阅读全文

posted @ 2015-10-03 09:28 joannae 阅读(211) 评论(0) 推荐(0) 编辑

75. Sort Colors (Array)

摘要: 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, ... 阅读全文

posted @ 2015-10-03 08:34 joannae 阅读(190) 评论(0) 推荐(0) 编辑

88. Merge Sorted Array (Array)

摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size tha... 阅读全文

posted @ 2015-10-03 07:56 joannae 阅读(143) 评论(0) 推荐(0) 编辑

2015年10月1日

进制转换

摘要: 十六进制,十进制,二进制的转换,转换结果放在一个string中首先,十进制转到几进制,就是除以几的余数,先得到的放在低位,直至结果为0其次string转成int:Integer.parseInt(s); 也可以通过string得到char,在通过与'0'相减比较得到intint转成string: S... 阅读全文

posted @ 2015-10-01 15:01 joannae 阅读(157) 评论(0) 推荐(0) 编辑

JRE,JVM,JDK

摘要: JRE,JVM,JDK的关系。JRE(Java Runtime Environment)java运行环境,我们可以把它看成是一个操作系统。也就是说JRE提供了Java执行的软件平台。JVM (Java Virtual Machine)Java虚拟机。所谓“虚拟机”顾名思义就是模拟出来的东西。JVM就... 阅读全文

posted @ 2015-10-01 14:35 joannae 阅读(159) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 43 下一页

导航