2017年7月14日

摘要: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be 阅读全文
posted @ 2017-07-14 16:38 sure0328 阅读(83) 评论(0) 推荐(0)

2017年7月12日

摘要: Implement wildcard pattern matching with support for '?' and '*'. 所以考虑用回溯。 此博客讲解的很详细,http://blog.csdn.net/u012848330/article/details/52596618 阅读全文
posted @ 2017-07-12 14:09 sure0328 阅读(77) 评论(0) 推荐(0)
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo 阅读全文
posted @ 2017-07-12 10:44 sure0328 阅读(65) 评论(0) 推荐(0)

2017年7月11日

摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Note:The input is assumed to be a 3 阅读全文
posted @ 2017-07-11 23:03 sure0328 阅读(68) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文
posted @ 2017-07-11 17:00 sure0328 阅读(73) 评论(0) 推荐(0)
摘要: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 阅读全文
posted @ 2017-07-11 16:24 sure0328 阅读(73) 评论(0) 推荐(0)
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2017-07-11 16:03 sure0328 阅读(93) 评论(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 @ 2017-07-11 15:23 sure0328 阅读(100) 评论(0) 推荐(0)
摘要: Implement regular expression matching with support for '.' and '*'. 1.p为空,那s必然也为空 2.s为空,看p的第二字符是否为*,为*的话 则为isMatch(s,p.substring(2)); 3.都不为空,p的第二字符为*, 阅读全文
posted @ 2017-07-11 15:04 sure0328 阅读(89) 评论(0) 推荐(0)
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2017-07-11 11:23 sure0328 阅读(62) 评论(0) 推荐(0)

导航