关闭

Regular Expression Matching

Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input st...
阅读(311) 评论(0)

Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1]. Note: Recursive solut...
阅读(210) 评论(0)

Longest Palindromic Substring

http://blog.csdn.net/hopeztm/article/details/7932245...
阅读(260) 评论(0)

Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
阅读(274) 评论(0)

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. Fo...
阅读(357) 评论(0)

Median of Two Sorted Arrays

There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n))....
阅读(346) 评论(0)

Two Sum

Mar 14 '11 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to...
阅读(337) 评论(0)

git

tag 在git中可以为任意其他对象添加tag,包括commit,tree,blob,甚至包括tag自身。git中都是用sha-1标识git对象,这是一个40个字符长度的字符串,不方便记忆,那么可为git对象添加一个tag便于标识不同对象。 添加tag # git tag tag-name sha-1 $ git tag v1.0 bdc390c2 这样便为bdc390c2的对...
阅读(378) 评论(0)

C4.5决策树算法

属性选择上采用信息增益率,另外要注意决策树是穷举的,也就是所有的condition都要能有决策,尽管没有某个属性值的存在(但声明了这个可能)。还有默认类的选择上C4.5采用的策略是未被覆盖的多数类。 package com.tur4.algorithm; import java.io.BufferedReader; import java.io.File; import java.io...
阅读(579) 评论(0)

FPTree

FPTree的资料网上很多,就不写了。 我范的错误:1、忽略了深拷贝,有多条记录时,这多条记录是得重新clone的,看来基础还得加强;                         2、headerTable中必须是全序的; package com.tur4; import java.util.LinkedList; import java.util.List;...
阅读(363) 评论(0)

Do the Untwist

Do the Untwist Time Limit: 2 Seconds      Memory Limit: 65536 KB Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the cip...
阅读(263) 评论(0)

Jugs

Jugs Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge In the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given...
阅读(8732) 评论(0)

jquery interaction

drag me drag me Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7 ​ #draggable{ width:100px; height:50; z-index:1;...
阅读(291) 评论(0)

Problem 1478 环形整数串 from http://acm.fzu.edu.cn/problem.php?pid=1478

Problem Description 你知道最大和子串问题么? 就是给你一个整数串,要你求出其中的一个连续子串,要求其和最大。 比如: 串是 -2 2 0 1 -48 1,显然其最大和连续子串是2 0 1,其和是3。 现的问题是如果求环形整数串的最大连续和子串呢? 请编写一个程序解决这个问题。  Input 本题有多组输入数据,你必须处理到EOF为止 每组数据的...
阅读(562) 评论(0)

Problem 1582 众数问题 from http://acm.fzu.edu.cn/problem.php?pid=1582

Problem Description 给定含有n个元素的多重集合S,每个元素在S中出现的次数称为该元素的重数。多重集S中重数最大的元素称为众数。 例如,S={1,2,2,2,3,5}。 多重集S的众数是2,其重数为3。  Input 输入包括多组数据,请处理到EOF结束。 每组数据,以一个n(131~231)。  Output 对于每组输入数据,输...
阅读(608) 评论(0)
130条 共9页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:60780次
    • 积分:1859
    • 等级:
    • 排名:千里之外
    • 原创:105篇
    • 转载:25篇
    • 译文:0篇
    • 评论:2条
    文章分类
    最新评论