problem:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.思路解析:使用hashmap来存储已排好序的字符串。注意i...
分类:
其他好文 时间:
2015-07-14 16:58:05
阅读次数:
114
有个需求测试,要用webdriver 登录到新浪微博
/**
* for init the webdriver
* @return webdriver
* author: aerchi
* 2015-07-14
*/
public static WebDriver initWebDriver()
{
WebDriver curDriver=null;
try{...
分类:
Web程序 时间:
2015-07-14 15:50:49
阅读次数:
352
题目链接:https://leetcode.com/problems/remove-nth-node-from-end-of-list/
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: ...
分类:
其他好文 时间:
2015-07-14 15:50:20
阅读次数:
122
该题和前面的"
Basic Calculator
"的处理方法一样,只是加入了对"*"、"/"两种运算的支持。
class Solution {
public:
bool isnum(char c){
if(c >= '0' && c <= '9')
return true;
return false;
}
...
分类:
其他好文 时间:
2015-07-14 15:47:48
阅读次数:
111
该题比较简单,递归交换每一个节点的左右子树即可。
class Solution {
public:
TreeNode* invertTree(TreeNode* root) {
if(root == NULL)
return NULL;
TreeNode* tmp = root -> left;
root -> le...
分类:
其他好文 时间:
2015-07-14 15:46:50
阅读次数:
89
链接:https://leetcode.com/problems/remove-duplicates-from-sorted-array/
问题描述:
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do n...
分类:
其他好文 时间:
2015-07-14 15:39:00
阅读次数:
103
题目链接:https://leetcode.com/problems/merge-two-sorted-lists/
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first
two...
分类:
其他好文 时间:
2015-07-14 15:35:59
阅读次数:
111
题目: 096 Unique Binary Search Trees这道题目就是catalan数, 因为递归关系 为 代码为class Solution: # @param {integer} n # @return {integer} def numTrees(self, n)...
分类:
其他好文 时间:
2015-07-14 15:19:13
阅读次数:
93
// 启动服务SC_HANDLE schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); // 创建到服务控制管理器的连接if (schSCManager == NULL){ return FALSE;}SC_HANDLE.....
Question:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root...
分类:
其他好文 时间:
2015-07-14 15:04:32
阅读次数:
98