自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 299. Bulls and Cows

题目:You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide

2015-12-26 22:48:15 200

原创 236. Lowest Common Ancestor of a Binary Tree

题目:Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between

2015-12-21 17:15:17 276

原创 235. Lowest Common Ancestor of a Binary Search Tree

题目:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defin

2015-12-20 22:12:49 209

原创 143. Reorder List

题目:Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reord

2015-12-20 22:06:51 221

原创 31、Next Permutation

题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest

2015-12-15 22:53:52 239

原创 Excel Sheet Column Number

题目:Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3

2015-12-14 22:12:56 203

原创 Remove Duplicate Letters

题目:Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographica

2015-12-14 11:30:26 301

原创 125、Valid Palindrome

题目:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" 

2015-12-08 22:49:04 197

原创 199、Binary Tree Right Side View

题目:iven a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Given the following binary tree,

2015-12-08 16:40:03 222

原创 101、Symmetric Tree

题目:iven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3B

2015-12-08 11:10:12 216

原创 173、Binary Search Tree Iterator

题目:mplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note

2015-12-07 16:07:04 199

原创 100、Same Tree

题目:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.解题思

2015-12-06 22:29:15 199

原创 13、Roman to Integer

题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.解题思路:c++版本:class Solution {public: int toNum(char c) { swi

2015-12-06 22:11:21 210

原创 12、Integer to Roman

题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.解题思路:罗马数字共有七个,即I(1),V(5),X(10),L(50),C(100),D(500),M(1000)。按照下面的规则可以表示任

2015-12-06 21:40:32 273

原创 10、Regular Expression Matching

题目:mplement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire

2015-12-06 16:01:18 193

原创 OpenDaylight的Helium(氦)版本安装

在安装opendaylight遇到各种问题才成功。现在将搜到的资料整理如下,按此方法可以正确安装opendaylight!!OpenDaylight(以下简写为ODL)的Helium(氦)版本已发布,具体详情可参考ODL官网。Helium(氦)版本只发布了一个版本,下载链接地址为http://www.opendaylight.org/software/downloads/helium。

2015-12-05 21:21:21 662

原创 6、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

2015-12-05 17:06:00 170

原创 275、H-Index II

题目:Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?Hint:Expected runtime complexity is in O(log n) and the input is s

2015-12-03 20:32:40 299

原创 274、H-Index

题目:Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.According to the definition of h-index on Wikip

2015-12-03 19:32:17 701

原创 OpenStack, OpenDaylight, OpenFlow and Open vSwitch

PS:在Quora上看到的,将openstack,openflow,opendaylight解释的还不错。学习一下。OpenStack is a Cloud Management System which is just a facade that provides a uniform API for  provisioning Compute, Network, Storage in a

2015-12-03 16:27:43 850

转载 云计算与虚拟网络

编者按:什么是虚拟网网络?为什么需要虚拟网络?怎样实现虚拟网络?对虚拟网络感兴趣的小伙伴们全部看过来吧,看大神怎样深入浅出的讲解虚拟网络。网络虚拟化(Network Virtualization)对于很多网络工程师尤其是刚入行的新手常常有一种懵懵懂懂,不甚了然的神秘感觉,虽然常常为之想入非非,最终还是似是而非。在这篇BLOG里面,除了举例,不涉及具体的技术和实现,尽量展现网络虚

2015-12-03 15:24:36 733

原创 8、String to Integer (atoi)

题目:mplement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible

2015-12-02 21:38:30 185

原创 dpctl

dpctl是mininet中一个可以分配、修改和管理流表的指令。dpctl比较常用的有:(1)显示基本信息  dpctl show tcp::6634   (2)显示流表  dpctl dump-flows tcp::6634   (3)添加流表  dpctl add-flow tcp:127.0.0.1:6634 in_port=2,idle_timeout=

2015-12-02 09:24:54 1612

原创 111、Minimum Depth of Binary Tree

题目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.解题思路:# Definition for a b

2015-12-01 23:07:53 248

原创 104、Maximum Depth of Binary Tree

题目:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.解题思路:# Definition for a b

2015-12-01 23:06:31 159

原创 129、Sum Root to Leaf Numbers

题目:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find

2015-12-01 19:43:02 180

原创 112、path sum

题目:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree

2015-12-01 17:22:20 167

空空如也

空空如也

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

TA关注的人

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