算法
文章平均质量分 60
cheetach_Jiang
这个作者很懒,什么都没留下…
展开
-
TADM_3-11
Problem: Suppose that we are given a sequence of n values x1, x2, ..., xn and seek to quickly answer repeated queries of the form:given i and j, find the smallest value in xi, ...., xj.1. Desig原创 2013-08-28 21:36:55 · 1725 阅读 · 0 评论 -
TADM_3-15
Problem:Design a data structure that allows one to search, insert, and delete an integerX in O(1) time (i.e. , constant time, independent of the total number of integersstored). Assume that 1 ≤原创 2013-08-28 22:24:41 · 673 阅读 · 0 评论 -
One way to improve running time
For most puzzles, if we can understand what the question says, we will be able to give a direct answer. But that simple answer is always not so good in terms of efficiency.Sometimes this is because原创 2013-08-28 22:47:57 · 577 阅读 · 0 评论 -
CJ_China_Campus_Test_Summary
This is my own summary of the contest, mainly to give myself advice on how to make me faster on the next contest.1. Bad horse. Situation: This is a simple graph traversal problem. I used 34 mi原创 2013-09-14 11:42:16 · 718 阅读 · 0 评论 -
LeetCode_Single Number II
My understanding of Leetcode 'Single Number II'原创 2013-10-05 17:24:08 · 1024 阅读 · 4 评论 -
Leetcode_Populating Next Right Pointers in Each Node II
Question link: http://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could原创 2013-10-04 20:20:10 · 549 阅读 · 0 评论 -
Longest Substring using dp and thinking on dp
Problem:find the longest consecutive substring of two string S, K. Use DP.Solution: Matrix: m[m][n] m[i][j] = 0, if Si != Kj; m[i][j] = m[i-1][j-1] + 1 if Si == Kj;原创 2013-09-06 23:37:34 · 543 阅读 · 0 评论