题目描述:给出一个正整数,不使用内置函数,如sqrt(),判断这个数是不是一个数的平方。 思路:直接使用二分法,貌似没啥好说的。代码如下: ...
分类:
编程语言 时间:
2017-10-21 19:14:36
阅读次数:
238
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the ...
分类:
其他好文 时间:
2017-10-20 18:21:04
阅读次数:
80
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only ...
分类:
其他好文 时间:
2017-10-20 13:41:37
阅读次数:
210
service资源 service资源主要对服务做启动、重启、关闭,监控进程的状态等.service的参数:service{‘resourcetitle‘:
name=>#(namevar)Thenameoftheservicetorun.Thisnameis...
ensure=>#Whetheraserviceshouldberunning.Valid...
binary=>#Thepathtothedaemon.Thisiso..
分类:
其他好文 时间:
2017-10-18 20:10:51
阅读次数:
189
背景 今天在使用JavaAPI来连接sqoop1.99.7的时候,遇到了个错误。 错误信息如下: 问题分析: 从报错信息上看貌似是Authentication认证的一些错误 解决方案 无意中在http://blog.csdn.net/jiacai2050/article/details/591176 ...
分类:
系统相关 时间:
2017-10-18 15:29:12
阅读次数:
248
hadoop环境部署完,执行hdfs zkfc -formatZK命令时,提示如上图所示错误 错误内容: 经调查结果是由于主机的hostname不合法,修改为不包含着‘.’ '/' '_'等非法字符。 ...
分类:
其他好文 时间:
2017-10-17 20:08:04
阅读次数:
946
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan ...
分类:
其他好文 时间:
2017-10-16 23:35:07
阅读次数:
383
Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we tak ...
分类:
其他好文 时间:
2017-10-16 21:36:40
阅读次数:
128
Description: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must ...
分类:
其他好文 时间:
2017-10-16 13:43:23
阅读次数:
176
题目描述 小城和小华都是热爱数学的好学生,最近,他们不约而同地迷上了数独游戏,好胜的他 们想用数独来一比高低。但普通的数独对他们来说都过于简单了,于是他们向 Z 博士请教, Z 博士拿出了他最近发明的“靶形数独”,作为这两个孩子比试的题目。 靶形数独的方格同普通数独一样,在 9 格宽×9 格高的大九 ...
分类:
其他好文 时间:
2017-10-15 22:26:53
阅读次数:
134