上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: hihocoder 1485:hiho字符串 描述如果一个字符串恰好包含2个& 39;h& 39;、1个& 39;i& 39;和1个& 39;o& 39;,我们就称这个字符串是hiho字符串。  例如"oihateher"、"hugeinputhugeoutp 阅读全文
posted @ 2017-03-27 12:30 HorseShoe2016 阅读(625) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the values of its boundary in anti clockwise direction starting from root. Boundary includes left boundary, leaves, and ri 阅读全文
posted @ 2017-03-26 12:00 HorseShoe2016 阅读(1129) 评论(0) 推荐(0) 编辑
摘要: During the NBA playoffs, we always arrange the rather strong team to play with the rather weak team, like make the rank 1 team play with the rank nth 阅读全文
posted @ 2017-03-19 11:17 HorseShoe2016 阅读(451) 评论(0) 推荐(0) 编辑
摘要: Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
posted @ 2017-03-19 11:07 HorseShoe2016 阅读(366) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2017-03-19 11:01 HorseShoe2016 阅读(880) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe 阅读全文
posted @ 2017-03-19 10:58 HorseShoe2016 阅读(665) 评论(0) 推荐(0) 编辑
摘要: 536. Construct Binary Tree from String You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input repre 阅读全文
posted @ 2017-03-12 22:22 HorseShoe2016 阅读(976) 评论(0) 推荐(0) 编辑
摘要: 527. Word Abbreviation Given an array of n distinct non empty strings, you need to generate minimal possible abbreviations for every word following ru 阅读全文
posted @ 2017-03-12 21:59 HorseShoe2016 阅读(735) 评论(0) 推荐(0) 编辑
摘要: 问题描述 Given a picture consisting of black and white pixels, and a positive integer N, find the number of black pixels located at some specific row R an 阅读全文
posted @ 2017-03-06 12:09 HorseShoe2016 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 问题描述 In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial 阅读全文
posted @ 2017-03-06 11:30 HorseShoe2016 阅读(521) 评论(0) 推荐(0) 编辑
摘要: Lonely Pixel I 两种算法之间的性能比较 今天参加LeetCode Weekly Contest 22,第二题 "Lonely Pixel I" 问题描述如下: Given a picture consisting of black and white pixels, find the 阅读全文
posted @ 2017-03-05 19:59 HorseShoe2016 阅读(1182) 评论(0) 推荐(0) 编辑
摘要: 新建了一个Android Studio工程,在MainActivity的主界面中添加了两个按钮,点击其中一个按钮用来启动 NormalActivity,点击另一按钮用来启动DialogActivity. 其中,NormalActivity和DialogActivity都是很简单的界面,只是在Andr 阅读全文
posted @ 2017-02-27 21:03 HorseShoe2016 阅读(4893) 评论(1) 推荐(1) 编辑
摘要: 问题描述 You need to find the largest element in each row of a Binary Tree. Example: Input: 1 / \ 2 3 / \ \ 5 3 9 Output: [1, 3, 9] 算法分析 使用两个队列,逐层遍历二叉树的各个 阅读全文
posted @ 2017-02-12 15:54 HorseShoe2016 阅读(226) 评论(0) 推荐(0) 编辑
摘要: ####问题描述 Given a binary tree, find the left most element in the last row of the tree. #####Example 1: Input: 2 / \ 1 3 Output: 1 #####Example 2: Input 阅读全文
posted @ 2017-02-12 15:44 HorseShoe2016 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 宿主机无法访问虚拟机中的web服务 在Windows7宿主机中的VMware虚拟机中安装了CentOS6.5操作系统,并且基于Nginx搭建了Web服务器,网页刚刚搭建好的时候,通过宿主机的浏览器可以访问虚拟机中的网页。但是过了一会儿,就无法访问了,这个问题困扰了自己好几天,每次只好通过虚拟机快照返 阅读全文
posted @ 2016-12-31 12:07 HorseShoe2016 阅读(6046) 评论(0) 推荐(0) 编辑
摘要: CentOS6.5系统下设置自己安装的程序开机自动启动 方法1. 把启动程序的命令添加到 /etc/rc.d/rc.local 文件中,比如设置开机启动 mysqld: !/bin/sh This script will be executed after all the other init sc 阅读全文
posted @ 2016-12-29 13:55 HorseShoe2016 阅读(10633) 评论(0) 推荐(1) 编辑
摘要: 首先要确保网络畅通,因为该过程要通过网络下载相关的软件包。 在 root 用户下,使用 cd ~/Downloads 命令进入下载文件夹,然后依次输入如下三个命令: [root@prime:~/Documents]$ wget http://mirrors.yun idc.com/epel/6/i3 阅读全文
posted @ 2016-12-26 22:19 HorseShoe2016 阅读(4469) 评论(0) 推荐(0) 编辑
摘要: 使用vim命令编辑 /etc/sysconfig/network scripts/ifcfg eth0 文件 vim /etc/sysconfig/network scripts/ifcfg eth0 为了使用静态网络,并禁用ipv6以加速网络,在文件中添加如下文字: DEVICE=eth0 HWA 阅读全文
posted @ 2016-12-26 21:38 HorseShoe2016 阅读(891) 评论(0) 推荐(1) 编辑
摘要: CentOS修改主机名 CentOS7和CentOS6.5 修改主机名的方法略有不同。 通过 hostname 命令可以查看当前的主机名。 1、 临时修改主机名 通过 'hostname 新的主机名' 命令可以设置主机名,但是这个方法在系统重启后就失效了。 2、 CentOS 6.5: 永久性修改主 阅读全文
posted @ 2016-12-26 11:28 HorseShoe2016 阅读(437) 评论(0) 推荐(0) 编辑
摘要: 《C程序设计语言》练习题 5 10 编写程序 expr,计算从命令行输入的逆波兰表达式的值,其中每个运算符或操作数用一个单独的参数表示。例如,命令 expr 2 3 4 + 计算表达式2x(3+4)的值 算法实现 getfloat.c: // getfloat.c include include i 阅读全文
posted @ 2016-10-18 17:26 HorseShoe2016 阅读(1126) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页