码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
LeetCode:Anagrams
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
[乐意黎原创] 使用Selenium webdriver+Firefox浏览器来登录新浪微博
有个需求测试,要用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
#19 Remove Nth Node From End of List
题目链接: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 II
该题和前面的" 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
Invert Binary Tree
该题比较简单,递归交换每一个节点的左右子树即可。 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
26 Remove Duplicates from Sorted Array
链接: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
#21 Merge Two Sorted Lists
题目链接: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
题目: 096 Unique Binary Search Trees这道题目就是catalan数, 因为递归关系 为 代码为class Solution: # @param {integer} n # @return {integer} def numTrees(self, n)...
分类:其他好文   时间:2015-07-14 15:19:13    阅读次数:93
Windows启动及停止服务
// 启动服务SC_HANDLE schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); // 创建到服务控制管理器的连接if (schSCManager == NULL){ return FALSE;}SC_HANDLE.....
分类:Windows程序   时间:2015-07-14 15:08:15    阅读次数:147
[LeetCode] Binary Tree Level Order Traversal II
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!