上一页 1 ··· 8 9 10 11 12 13 14 15 下一页
摘要: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time... 阅读全文
posted @ 2015-12-21 17:21 0giant 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings.这个题目和count and say比较类似了。就是把单独处理字符串的函数写出来,然后一个循环来实现最终功能就行了。这道题,就是... 阅读全文
posted @ 2015-12-20 16:01 0giant 阅读(224) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read off... 阅读全文
posted @ 2015-12-18 21:38 0giant 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Remove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 --... 阅读全文
posted @ 2015-12-17 09:50 0giant 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter... 阅读全文
posted @ 2015-12-16 11:13 0giant 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences... 阅读全文
posted @ 2015-12-16 10:37 0giant 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the c... 阅读全文
posted @ 2015-12-15 11:14 0giant 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After ... 阅读全文
posted @ 2015-12-15 09:20 0giant 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the ... 阅读全文
posted @ 2015-12-14 20:45 0giant 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Find the total area covered by two rectilinear rectangles in a 2D plane.Each rectangle is defined by its bottom left corner and top right corner as sh... 阅读全文
posted @ 2015-12-13 21:56 0giant 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ... 阅读全文
posted @ 2015-12-11 09:19 0giant 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with... 阅读全文
posted @ 2015-12-10 20:32 0giant 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return... 阅读全文
posted @ 2015-12-10 08:34 0giant 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size tha... 阅读全文
posted @ 2015-12-09 18:12 0giant 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest le... 阅读全文
posted @ 2015-12-09 14:52 0giant 阅读(185) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页