码迷,mamicode.com
首页 >  
搜索关键字:longest common prefi    ( 11533个结果
HDU1019 Least Common Multiple
HDU1019...
分类:其他好文   时间:2014-07-22 23:04:12    阅读次数:224
[Java]#从头学Java# Java大整数相加
重操旧业,再温Java,写了个大整数相乘先回顾回顾基本知识。算法、效率什么的都没怎么考虑,就纯粹实现功能而已。先上代码: 1 package com.tacyeh.common; 2 3 public class MyMath { 4 5 public static String Big...
分类:编程语言   时间:2014-05-02 13:02:39    阅读次数:396
LeetCode5:Longest Palindromic Substring
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo...
分类:其他好文   时间:2014-05-01 20:07:13    阅读次数:429
SQL Mirroring[Hot back up with Double machine]
Background: It's fairly common for businesses to want to provide some high availability for their SQL Server databases, and one option is to have two SQL Server databases on separate machines with a SQL Server database mirrored....
分类:数据库   时间:2014-04-30 22:11:38    阅读次数:520
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:其他好文   时间:2014-04-29 13:47:20    阅读次数:251
Pat(Advanced Level)Practice--1063(Set Similarity)
Pat1063代码 题目描述: Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the to...
分类:其他好文   时间:2014-04-29 13:44:20    阅读次数:325
leetCode解题报告5道题(六)
5道题目分别是:【Longest Substring Without Repeating Characters】、【Rotate Image】、【Restore IP Addresses】、【ZigZag Conversion】、【Set Matrix Zeroes】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录...
分类:其他好文   时间:2014-04-29 13:43:23    阅读次数:348
POJ 2533 Longest Ordered Subsequence 最长上升子序列
最长上升子序列: 有两种基本方法:两个时间复杂度分别为O(n^2)和O(nlogn)。 O(n^2) 容易的出动态规划的递推公式dp[i]=max(dp[j])+1 j=1,2...i-1,dp[i]是以元素i结尾的最长子序列个数。 在O(n^2)的最长上升子序列中可以通过记录每个元素前缀元素位置的方式来得到整个的最长上升子序列。 代码:int LISOn2(int a[],int to...
分类:其他好文   时间:2014-04-29 13:24:22    阅读次数:314
hdu 1595 find the longest of the shortest(dijstra + 枚举)
http://acm.hdu.edu.cn/showproblem.php?pid=1595 大致题意: 给一个图,让输出从中删除任意一条边后所得最短路径中最长的。。 思路: 直接枚举每条边想必是不行的。其实有些边是不需要枚举的,因为删除它们并不影响起点到终点的最短路。起作用的边都是未删边前的最短路径上的边,删除它们最短距离肯定增大,只需在这些最短距离中求最大的即可。 记录最短路...
分类:Web程序   时间:2014-04-28 10:24:42    阅读次数:393
CSU 1411: Longest Consecutive Ones
关键是通过预处理吧每个区间内的一移动到一起的最少步骤算出来.... 1411: Longest Consecutive Ones Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 185  Solved: 40 [Submit][Status][Web Board] Description Given a...
分类:其他好文   时间:2014-04-27 21:21:05    阅读次数:305
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!