• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 21 22 23 24 25 26 27 28 29 下一页
2016年3月5日
39. Combination Sum
摘要: 1. 每个元素可用多次 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The 阅读全文
posted @ 2016-03-05 18:17 ArgenBarbie 阅读(205) 评论(0) 推荐(0)
37. Sudoku Solver *HARD*
摘要: 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 @ 2016-03-05 16:32 ArgenBarbie 阅读(318) 评论(0) 推荐(0)
36. Valid Sudoku
摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled wit 阅读全文
posted @ 2016-03-05 16:17 ArgenBarbie 阅读(162) 评论(0) 推荐(0)
33. 81. Search in Rotated Sorted Array *HARD*
摘要: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target va 阅读全文
posted @ 2016-03-05 14:43 ArgenBarbie 阅读(200) 评论(0) 推荐(0)
32. Longest Valid Parentheses *HARD*
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo 阅读全文
posted @ 2016-03-05 12:01 ArgenBarbie 阅读(179) 评论(0) 推荐(0)
31. Next Permutation
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2016-03-05 11:12 ArgenBarbie 阅读(165) 评论(0) 推荐(0)
30. Substring with Concatenation of All Words *HARD*
摘要: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca 阅读全文
posted @ 2016-03-05 10:24 ArgenBarbie 阅读(211) 评论(0) 推荐(0)
2016年3月4日
29. Divide Two Integers
摘要: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. (1) log int divide(int dividend, int d 阅读全文
posted @ 2016-03-04 23:40 ArgenBarbie 阅读(216) 评论(0) 推荐(0)
2016年3月3日
KMP算法
摘要: void getNext(string needle, int *next) { int l = needle.length(), i, k; next[0] = -1; k = -1; for(i = 0; i < l-1;) { if(-1 == k || needle[i] == needle 阅读全文
posted @ 2016-03-03 23:36 ArgenBarbie 阅读(205) 评论(0) 推荐(0)
23. Merge k Sorted Lists
摘要: 合并k个有序列表。 (1)堆排序 bool cmp(ListNode *l1,ListNode *l2){ return l1->val > l2->val; } class Solution { public: ListNode* mergeKLists(vector<ListNode*>& li 阅读全文
posted @ 2016-03-03 17:26 ArgenBarbie 阅读(178) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3