上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页
摘要: Given a string containing just the characters'(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the c 阅读全文
posted @ 2016-03-10 09:23 哥布林工程师 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. "A man, a plan, a canal: Panama" is a pa 阅读全文
posted @ 2016-03-10 06:46 哥布林工程师 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space 阅读全文
posted @ 2016-03-10 06:37 哥布林工程师 阅读(165) 评论(0) 推荐(0) 编辑
摘要: A robot is located at the top-left corner of a m x ngrid (marked 'Start' in the diagram below). The robot can only move either down or right at any po 阅读全文
posted @ 2016-03-10 06:25 哥布林工程师 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Implement an algorithm to determine if a string has all unique characters. Given "abc", return true. Given "aab", return false. public class Solution 阅读全文
posted @ 2016-03-09 08:44 哥布林工程师 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Write a method anagram(s,t) to decide if two strings are anagrams or not. Given s="abcd", t="dcab", return true. public class Solution { /** * @param 阅读全文
posted @ 2016-03-09 08:38 哥布林工程师 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. Given the following trian 阅读全文
posted @ 2016-03-09 08:30 哥布林工程师 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm which computes the number of trailing zeros in n factorial. 11! = 39916800, so the out should be 2 这道题的思路比较诡异,结尾要有0的话,必须要有质因数2和质因数5 阅读全文
posted @ 2016-03-07 17:43 哥布林工程师 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. Given 1->2->3->4, you should return the list as 2->1->4->3. /** * Definition f 阅读全文
posted @ 2016-03-07 08:44 哥布林工程师 阅读(94) 评论(0) 推荐(0) 编辑
摘要: You have two every large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of 阅读全文
posted @ 2016-03-07 08:15 哥布林工程师 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 23 下一页