摘要: 题目描述 请实现一个函数用来判断字符串是否表示数值(包括整数和小数)。例如,字符串"+100","5e2","-123","3.1416"和"-1E-16"都表示数值。 但是"12e","1a3.14","1.2.3","+-5"和"12e+4.3"都不是。 1 public class Solut 阅读全文
posted @ 2020-02-16 20:39 hyx1 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 题目描述 请实现一个函数用来匹配包括'.'和'*'的正则表达式。模式中的字符'.'表示任意一个字符,而'*'表示它前面的字符可以出现任意次(包含0次)。 在本题中,匹配是指字符串的所有字符匹配整个模式。例如,字符串"aaa"与模式"a.a"和"ab*ac*a"匹配,但是与"aa.a"和"ab*a"均 阅读全文
posted @ 2020-02-16 19:51 hyx1 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,重复的结点不保留,返回链表头指针。 例如,链表1->2->3->3->4->4->5 处理后为 1->2->5 /* public class ListNode { int val; ListNode next = null; 阅读全文
posted @ 2020-02-16 19:18 hyx1 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4,-1,1] Output: 阅读全文
posted @ 2020-02-16 17:26 hyx1 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
posted @ 2020-02-16 00:18 hyx1 阅读(85) 评论(0) 推荐(0) 编辑