上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 46 下一页
  2017年9月10日
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "b 阅读全文
posted @ 2017-09-10 00:42 Beserious 阅读(110) 评论(0) 推荐(0) 编辑
  2017年9月6日
摘要: You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2017-09-06 23:12 Beserious 阅读(129) 评论(0) 推荐(0) 编辑
  2017年9月5日
摘要: Given n non negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2017-09-05 12:49 Beserious 阅读(128) 评论(0) 推荐(0) 编辑
  2017年9月4日
摘要: Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inputs are consist of lowercase letters a z. 字典树 阅读全文
posted @ 2017-09-04 20:32 Beserious 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 每日一道题目,预防思维僵化 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which giv 阅读全文
posted @ 2017-09-04 15:04 Beserious 阅读(159) 评论(0) 推荐(0) 编辑
  2017年9月3日
摘要: 小明有n(1 using namespace std; int dp[2010][2010]; int main() { int n; while (cin n) { vector v(n); memset(dp, 0, sizeof dp); for (int i = 0; i v[i]; // 阅读全文
posted @ 2017-09-03 17:07 Beserious 阅读(1230) 评论(7) 推荐(0) 编辑
摘要: Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R = L). You might 阅读全文
posted @ 2017-09-03 12:28 Beserious 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Given a non empty special binary tree consisting of nodes with the non negative value, where each node in this tree has exactly two or zero sub node. 阅读全文
posted @ 2017-09-03 11:13 Beserious 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2017-09-03 11:11 Beserious 阅读(408) 评论(0) 推荐(0) 编辑
  2017年9月2日
摘要: 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 lette 阅读全文
posted @ 2017-09-02 20:20 Beserious 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 46 下一页