• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 20 21 22 23 24 25 26 27 28 29 下一页
2016年3月9日
55. 45. Jump Game II *HARD*
摘要: 1. Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your ma 阅读全文
posted @ 2016-03-09 22:57 ArgenBarbie 阅读(296) 评论(0) 推荐(0)
2016年3月7日
全源最短路径 - floyd算法 - O(N ^ 3)
摘要: Floyd-Warshall算法的原理是动态规划。 设Di,j,k为从i到j的只以(1..k)集合中的节点为中间节点的最短路径的长度。 若最短路径经过点k,则Di,j,k = Di,k,k − 1 + Dk,j,k − 1; 若最短路径不经过点k,则Di,j,k = Di,j,k − 1。 因此,D 阅读全文
posted @ 2016-03-07 17:23 ArgenBarbie 阅读(354) 评论(0) 推荐(0)
最小生成树 - 普里姆 - 边稠密 - O(N ^ 2)
摘要: #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #define N 1005 #define MAX 100000 int n, ans, A[N][N], dis[N], vis[N]; void Prim( 阅读全文
posted @ 2016-03-07 15:42 ArgenBarbie 阅读(275) 评论(0) 推荐(0)
最小生成树 - 克鲁斯卡尔 - 并查集 - 边稀疏 - O(E * logE)
摘要: #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 100005 int p[N]; struct Edge { i 阅读全文
posted @ 2016-03-07 15:33 ArgenBarbie 阅读(257) 评论(0) 推荐(0)
10. Regular Expression Matching *HARD*
摘要: Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding elemen 阅读全文
posted @ 2016-03-07 10:07 ArgenBarbie 阅读(182) 评论(0) 推荐(0)
4. Median of Two Sorted Arrays *HARD* -- 查找两个排序数组的中位数(寻找两个排序数组中第k大的数)
摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2016-03-07 00:00 ArgenBarbie 阅读(180) 评论(0) 推荐(0)
2016年3月6日
44. Wildcard Matching *HARD*
摘要: '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover the entire input st 阅读全文
posted @ 2016-03-06 17:58 ArgenBarbie 阅读(200) 评论(0) 推荐(0)
43. Multiply Strings 字符串表示的大数乘法
摘要: Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-neg 阅读全文
posted @ 2016-03-06 11:15 ArgenBarbie 阅读(179) 评论(0) 推荐(0)
2016年3月5日
42. Trapping Rain Water *HARD*
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2016-03-05 23:30 ArgenBarbie 阅读(173) 评论(0) 推荐(0)
41. First Missing Positive *HARD*
摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s 阅读全文
posted @ 2016-03-05 19:16 ArgenBarbie 阅读(145) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 29 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3