摘要:
题目: Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'. The matching should cover the ent 阅读全文
摘要:
题目: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives t 阅读全文
摘要:
题目: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Exam 阅读全文
摘要:
题目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the 阅读全文
摘要:
题目: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains 阅读全文
摘要:
题目: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 提交后显示运行时间超时。原来是代码中有太多重复迭代,如同求解斐波那契数列时的直接迭代解法 阅读全文