自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 资源 (1)
  • 收藏
  • 关注

原创 【leetcode 148 Sort List】

Sort a linked list in O(n log n) time using constant space complexity. 既然要求复杂度为O(nlogn),那么要么是快速排序要么是归并排序,这里采用归并排序,需要注意mid分割点的寻找 采用快慢指针得到mid节点,然后分为两段进行排序并合并,递归进行。代码如下:  public ListNode sortList(Li

2015-05-26 14:11:40 241

原创 【leetcode 190 Reverse Bits 】

Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as0011100101

2015-05-18 11:13:33 256

原创 【leetcode 203 Remove Linked List Elements 】

Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6 Return: 1 --> 2 --> 3 --> 4 --> 5 删除链表中的指定元素,该元素可能有多个,需要注意

2015-05-18 10:16:59 233

原创 [leetcode] Search in Rotated Sorted Array

基于折半查找,主要思想就是: 1、先找到mid元素,相等返回mid; 2、找到有序部分; 3、根据target是否在有序部分,进行循环划分; 主要代码: public class Solution {     public int search(int[] nums, int target) {         int low = 0;            int

2015-05-13 15:48:14 273

原创 2015-04-03myeclipse常见问题总结

1、myeclipse 中文乱码问题: a)设置整个myeclipse环境为UTF-8:window->Preferences->general->Workspace->Text file encoding->Other框中的Text file encoding改为UTF-8。 b)单改某一个项目编码:项目名上右键->Properties->Resource->Text file encodi

2015-04-03 14:20:36 301

bloomFilter实现海量字符串查找

布隆过滤器实现的海量字符串查找,从一百万Email地址中查找给定的一百个是否存在

2013-11-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除