Given a positive integer num, write a function which returns True if num is a perfect square else False. 样例 For example:Given num = 16Returns True For ...
分类:
其他好文 时间:
2018-01-28 21:59:03
阅读次数:
195
一、问题描述 判断一个不完整的数独是否正确。 判断数独是否正确的条件:1、每行的数不重复。2、没列的数不重复。3、划分成的9个3*3的块中没有数重复。 例子看下面代码中的测试用例。 二、问题解决 思路一:分3次循环来解决,第一次横向遍历,第二次纵向遍历,第三次以块遍历。每一次遍历一行、一列、或是一块 ...
分类:
其他好文 时间:
2018-01-28 15:37:06
阅读次数:
163
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: ...
分类:
其他好文 时间:
2018-01-28 11:18:06
阅读次数:
131
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 ...
分类:
其他好文 时间:
2018-01-28 11:09:53
阅读次数:
93
mb_check_encoding (PHP 4 = 4.4.3, PHP 5 = 5.1.3, PHP 7) mb_check_encoding — Check if the string is valid for the specified encoding mb_check_encoding ...
分类:
Web程序 时间:
2018-01-27 17:00:25
阅读次数:
218
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's ...
分类:
其他好文 时间:
2018-01-24 22:11:50
阅读次数:
118
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 ...
分类:
其他好文 时间:
2018-01-24 19:56:13
阅读次数:
164
配置注解映射器和注解适配器激活基于注解的配置 @RequestMapping, @ExceptionHandler,数据绑定 ,@NumberFormat ,@DateTimeFormat ,@Controller ,@Valid ,@RequestBody ,@ResponseBody等<mvc: ...
分类:
编程语言 时间:
2018-01-23 20:41:12
阅读次数:
145
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 判断字符串是不是回文,最多可以删除字符串的一个元素来使它成为回文。 解决:从字符 ...
分类:
其他好文 时间:
2018-01-20 22:45:35
阅读次数:
202
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak ...
分类:
其他好文 时间:
2018-01-20 10:57:58
阅读次数:
134