自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

uj_mosquito的专栏

菜鸟一枚

原创 Intersection of Two Linked Lists

Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: ...

2014-11-28 17:56:16

阅读数 533

评论数 0

原创 Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you solve it without using extra s...

2014-11-28 16:49:15

阅读数 409

评论数 0

原创 Linked List Cycle

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? #include #include typedef stru...

2014-11-28 15:10:20

阅读数 373

评论数 0

原创 Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2-&...

2014-11-28 14:54:50

阅读数 449

评论数 0

原创 apt-get update不成功的解决方法

1、apt-get update的时候不成功,如下图所示; 解决方法: 修改DNS,文件是/etc/resolve.conf,添加nameserver 8.8.8.8 2、添加后再次运行又显示错误,和锁相关,如下图所示: 解决方法: 将apt-get进程kill掉...

2014-11-27 16:56:30

阅读数 1425

评论数 0

原创 su authentication failure&ubuntu root被禁用的解决方法

1、password输入新的密码 2、sudo -i 在新安装的unbuntu14上用第一种方法失败了,换第二种方法可以成功

2014-11-27 14:58:53

阅读数 512

评论数 0

原创 Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a ...

2014-11-27 13:51:14

阅读数 530

评论数 0

原创 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 th...

2014-11-27 13:32:34

阅读数 412

评论数 0

原创 Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in o...

2014-11-27 13:14:15

阅读数 288

评论数 0

原创 Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled...

2014-11-26 22:09:17

阅读数 407

评论数 0

原创 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the t...

2014-11-26 19:51:17

阅读数 556

评论数 0

原创 Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Giv...

2014-11-26 17:23:57

阅读数 423

评论数 0

原创 Merge Sorted Array

Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater o...

2014-11-26 15:56:44

阅读数 511

评论数 0

原创 Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, ...

2014-11-26 09:43:52

阅读数 510

评论数 0

原创 Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space ...

2014-11-25 19:35:28

阅读数 527

评论数 0

原创 Remove Element

Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn'...

2014-11-25 15:53:45

阅读数 474

评论数 0

原创 Count and Say

The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or...

2014-11-25 09:56:52

阅读数 420

评论数 0

原创 Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the las...

2014-11-24 17:05:22

阅读数 455

评论数 0

原创 Add Binary

Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". ...

2014-11-24 16:41:12

阅读数 481

评论数 0

原创 Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. ...

2014-11-24 14:31:18

阅读数 531

评论数 0

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