自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 拷贝VMware造成mac地址冲突的问题

ifconfig eth0 显示网卡地址出新的网卡地址 修改/etc/sysconfig/network-scripts/ifcfg-eth0文件中的这一项HWADDR,使之与新的网卡地址对应然后重启网络 service network restart

2015-10-31 14:18:15 2750

原创 Find the Duplicate Number

Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, fin

2015-10-28 17:56:08 282

原创 Binary Tree Maximum Path Sum

Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The path

2015-10-17 10:26:49 271

原创 Course Schedule

There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair:

2015-10-15 08:50:37 220

原创 Restore IP Addresses

Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given “25525511135”,return [“255.255.11.135”, “255.255.111.35”]. (Order does not

2015-10-13 15:13:11 312

原创 Binary Tree Paths

Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]public class Solution { publi

2015-10-11 21:37:07 199

原创 ZigZag Conversion

The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I I GY

2015-10-08 16:27:12 191

原创 Sort List

Sort a linked list in O(n log n) time using constant space complexity.思路: 利用归并排序的思想,每一次采用快慢指正找出链表的中点,将中点左边的链表进行排序,然后中点右边的链表进行排序,最后将排好序的左右两边的链表进行归并。public class Solution { public ListNode sortList(

2015-10-07 18:57:38 154

原创 Majority Element II

Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space.思路: 很显然,数组中出现的次数多于 ⌊ n/3 ⌋次数的数字只能出现最多两次。考虑数组中出现次数多于 ⌊

2015-10-07 16:05:29 276

空空如也

空空如也

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

TA关注的人

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