- 博客(68)
- 收藏
- 关注
原创 阅读文章:Incorporating Knowledge Graph Embeddings into Topic Modeling
阅读文章:Incorporating Knowledge Graph Embeddings into Topic Modeling这是一篇发表到AAAI-17的Oral的文章:Incorporating Knowledge Graph Embeddings into Topic ModelingIntroduction:主体模型PLSA或者LDA作为无监督模型,若没有人类领域知识的帮助,得到的主题经
2017-10-13 00:34:30 1157
原创 leetcode hard level(part)
这部分hard level没有时间仔细思考,汇总一下感受。这部分hard level加上之前的题目详解,基本上覆盖hard题目。记录一下,第二遍复习使用。301. Remove Invalid Parentheses精妙解法:https://leetcode.com/discuss/81478/easy-short-concise-and-fast-java-dfs-3-ms-soluti
2016-05-19 00:41:33 595
转载 Morris Traversal方法遍历二叉树(非递归,不用栈,O(1)空间)
本文主要解决一个问题,如何实现二叉树的前中后序遍历,有两个要求:1. O(1)空间复杂度,即只能使用常数空间;2. 二叉树的形状不能被破坏(中间过程允许改变其形状)。通常,实现二叉树的前序(preorder)、中序(inorder)、后序(postorder)遍历有两个常用的方法:一是递归(recursive),二是使用栈实现的迭代版本(stack+iterative)。这
2016-05-07 22:52:35 335
原创 leetcode : 312. Burst Balloons : dp矩阵加括号
public class Solution { public int maxCoins(int[] nums) { int n=nums.length; int[] tnums=new int[n+2]; int[][]maxdp=new int[n+2][n+2]; System.arraycopy(nums, 0, tnums, 1, n); tnums[0]=1;
2016-04-14 21:12:01 636
原创 leetcode : 312. Burst Balloons : dp矩阵加括号
312. Burst BalloonsMy SubmissionsQuestionEditorial SolutionTotal Accepted: 7739 Total Submissions: 21379 Difficulty: HardGiven n balloons, indexed from 0 to n-1. Each ballo
2016-04-14 21:03:31 116
原创 leetcode :315. Count of Smaller Numbers After Self :归并排序应用
315. Count of Smaller Numbers After SelfMy SubmissionsQuestionEditorial SolutionTotal Accepted: 7919 Total Submissions: 26711 Difficulty: HardYou are given an integer array n
2016-03-29 21:11:26 1299
原创 leetcode :316 Remove Duplicate Letters : 贪心+递归搜索
316. Remove Duplicate LettersMy SubmissionsQuestionEditorial SolutionTotal Accepted: 11048 Total Submissions: 44956 Difficulty: HardGiven a string which contains only lowerca
2016-03-28 23:20:28 1843
原创 leetcode : 321. Create Maximum Number : 有点难度的贪心法
321. Create Maximum NumberMy SubmissionsQuestionTotal Accepted: 4587 Total Submissions: 22666 Difficulty: HardGiven two arrays of length m and n with digits 0-9 representing
2016-03-28 01:57:58 761
原创 leetcode : 327. Count of Range Sum : 连续和在指定区间内
327. Count of Range SumMy SubmissionsQuestionTotal Accepted: 3832 Total Submissions: 15268 Difficulty: HardGiven an integer array nums, return the number of range sums that l
2016-03-22 20:43:24 1281
原创 leetcode : 336. Palindrome Pairs : 拼接回文的个数
336. Palindrome PairsMy SubmissionsQuestionTotal Accepted: 1666 Total Submissions: 9046 Difficulty: HardGiven a list of unique words. Find all pairs of distinct indices (i, j
2016-03-22 20:30:06 1139
原创 leetcode : 337. House Robber III : 简单的树形DP
337. House Robber IIIMy SubmissionsQuestionTotal Accepted: 3244 Total Submissions: 8627 Difficulty: MediumThe thief has found himself a new place for his thievery again. There
2016-03-21 00:32:06 634
原创 leetcode 338 : Counting Bits :找规律&位运算
338. Counting BitsMy SubmissionsQuestionTotal Accepted: 3211 Total Submissions: 5600 Difficulty: MediumGiven a non negative integer number num. For every numbers i in the range
2016-03-20 23:12:55 358
原创 leetcode 329 : Longest Increasing Path in a Matrix : dfs+dp
329. Longest Increasing Path in a MatrixMy SubmissionsQuestionTotal Accepted: 9010 Total Submissions: 29883 Difficulty: HardGiven an integer matrix, find the length of the long
2016-03-12 00:23:34 305
原创 leetcode 330 : Patching Array :贪心法
330. Patching ArrayMy SubmissionsQuestionTotal Accepted: 5244 Total Submissions: 18390 Difficulty: MediumGiven a sorted positive integer array nums and an integer n, add/patch
2016-03-11 20:47:12 885
原创 leetcode 331 :Verify Preorder Serialization of a Binary Tree:简单题
331. Verify Preorder Serialization of a Binary TreeMy SubmissionsQuestionTotal Accepted: 6543 Total Submissions: 20906 Difficulty: MediumOne way to serialize a binary tree is t
2016-03-09 17:26:05 849
原创 leetcode 332: Reconstruct Itinerary:最小欧拉路径 & java8新特性
332. Reconstruct ItineraryMy SubmissionsQuestionTotal Accepted: 4958 Total Submissions: 21506 Difficulty: MediumGiven a list of airline tickets represented by pairs of departur
2016-03-09 01:08:18 1644
原创 leetcode 334 : Increasing Triplet Subsequence : 被智商压制
334. Increasing Triplet SubsequenceMy SubmissionsQuestionTotal Accepted: 5851 Total Submissions: 17931 Difficulty: MediumGiven an unsorted array return whether an increasing su
2016-03-04 23:55:03 572
原创 leetcode 335 : Self Crossing : 正反情况思考
335. Self CrossingMy SubmissionsQuestionTotal Accepted: 1941 Total Submissions: 11380 Difficulty: MediumYou are given an array x of n positive numbers. You start at point (0,
2016-03-04 22:01:11 1300
原创 mysql数据库搬砖总结
对于一个数据mysql数据库,使用的语句就是SQL语句。给出数据库地址:xx.xx.xx.xx:xx ,用户名:xx,密码:xx,数据库名称:xx。本地没有mysqo数据库,使用navicat直接连接远程数据库,填好给定的信息即可连接。navicat支持查询语句和函数的编写,并可以直接运行。对于表answer,SELECT出answer.parentId属性作为第一列,answer.Cre
2015-01-27 15:48:56 488
原创 POJ 1837:Balance:动态规划_背包问题变形
BalanceTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 10913 Accepted: 6787DescriptionGigel has a strange "balance" and he wants to poise it. Actually,
2014-11-29 16:26:59 740
原创 POJ 1922:Ride to School:水题练java
Ride to SchoolTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 19311 Accepted: 7814DescriptionMany graduate students of Peking University are living in W
2014-10-12 21:52:02 470
原创 POJ 2388:Who's in the Middle:快速排序思想求解中位数
Who's in the MiddleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31977 Accepted: 18617DescriptionFJ is surveying his herd to find the most average cow
2014-09-20 01:22:59 409
原创 POJ 3080:Blue Jeans:枚举求解n个字符串的最长公共连续子串
Blue JeansTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12468 Accepted: 5407DescriptionThe Genographic Project is a research partnership between IBM a
2014-09-20 00:35:31 558
原创 POJ 1936 :All in All:简单字符串查找
All in AllTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 28138 Accepted: 11591DescriptionYou have devised a new encryption technique which encodes a me
2014-09-19 20:33:26 362
原创 POJ 1035:Spell checker:字符串操作
Spell checkerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19237 Accepted: 7036DescriptionYou, as a member of a development team for a new spell check
2014-09-19 20:31:44 430
原创 POJ 3436 :ACM Computer Factory:网络流拆点应用
ACM Computer FactoryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5384 Accepted: 1858 Special JudgeDescriptionAs you know, all the computers used
2014-09-18 16:55:14 408
原创 POJ 1459 :Power Network:最大流算法
Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 23318 Accepted: 12213DescriptionA power network consists of nodes (power stations, consumer
2014-09-17 23:07:57 291
原创 POJ 3020:Antenna Placement:无向图的最小边覆盖
Antenna PlacementTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6458 Accepted: 3192DescriptionThe Global Aerial Research Centre has been allotted the t
2014-07-23 18:42:58 555
原创 POJ 3041:Asteroids:最小点覆盖
AsteroidsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14619 Accepted: 7962DescriptionBessie wants to navigate her spaceship through a dangerous aster
2014-07-21 21:44:43 370
转载 证明二分图最小点集覆盖=二分图最大匹配
二分图最大匹配=二分图最小点集覆盖,却一直不知道为什么。今天在网上找了些资料,参考了Matrix67的文章,再加上我自己的理解加想象。。。。。 首先解释一下什么事二分图最小点集覆盖,就是说选中一个点,就把以这个点为端点的所有边都选中了,求最少用几个点把所有的边都覆盖。证明用到了konig定理。过程是这样的,首先从右面点得集合中选出未匹配的点,然后选择“未匹配->匹配->未匹配..
2014-07-21 11:27:59 969
原创 POJ 1094:Sorting It All Out:拓扑排序的较为繁琐的逻辑变形
Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26852 Accepted: 9262DescriptionAn ascending sorted sequence of distinct values is one
2014-07-17 20:13:36 389
原创 POJ 3026:Borg Maze:BFS+prim
Borg MazeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8086 Accepted: 2703DescriptionThe Borg is an immensely powerful race of enhanced humanoids from
2014-07-17 12:33:18 517
原创 POJ 1258:Agri-Net:典型prim最小生成树(3)
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 38661 Accepted: 15592DescriptionFarmer John has been elected mayor of his town! One of his campa
2014-07-16 18:33:58 388
原创 POJ 2485:Highways:典型prim最小生成树(2)
HighwaysTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 21456 Accepted: 9884DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, F
2014-07-16 18:07:25 438
原创 POJ 1789:Truck History:典型prim最小生成树(1)
Truck HistoryTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 17386 Accepted: 6672DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types
2014-07-16 17:32:39 454
原创 POJ 2240:Arbitrage:folyd最短路算法变形求有向图的盈利环存在
ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15069 Accepted: 6333DescriptionArbitrage is the use of discrepancies in currency exchange rates
2014-07-15 16:53:50 707 1
原创 POJ 1125:Stockbroker Grapevine:多源最短路径forld
Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26280 Accepted: 14500DescriptionStockbrokers are known to overreact to rumours. You
2014-07-14 22:16:40 415
原创 POJ 2253:Frogger:dij的最短路思想变型
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 24809 Accepted: 8056DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Suddenl
2014-07-14 20:06:50 412
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人