码迷,mamicode.com
首页 >  
搜索关键字:generic algorithm    ( 18934个结果
LeetCode: Single Number
Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime comple...
分类:其他好文   时间:2014-05-23 07:22:48    阅读次数:241
Silverlight中后台动态生成树菜单
前台 后台:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Net;usingSystem.Windows;usingSystem.Windows.Controls;usingSystem.Windo....
分类:Web程序   时间:2014-05-23 07:21:31    阅读次数:296
C# 中文转拼音类
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace SU{ /// /// 中文转拼音 /// public class PinYin ...
分类:其他好文   时间:2014-05-23 06:46:51    阅读次数:395
C#:向SqlServer数据库中插入imange类型
using System;using System.Collections.Generic;using System.Linq;using System.Runtime.InteropServices;using System.Text;namespace Common{ public cla...
分类:数据库   时间:2014-05-21 20:41:53    阅读次数:333
Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-21 17:27:55    阅读次数:252
带复杂表头合并单元格的HtmlTable转换成DataTable并导出Excel(转)
步骤:一、前台JS取HtmlTable数据,根据设定的分隔符把数据拼接起来二、后台先把前台传过来的字符串转换成HtmlTable实体,然后再转换成DataTable实体using System;using System.Collections.Generic;using System.Text;us...
分类:Web程序   时间:2014-05-21 17:25:16    阅读次数:442
LeetCode: First Missing Positive [040]
【题目】 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 should run in O(n) time and uses constant space. 【题意】 给定一个数组,找出第一个缺失的正数。时间复杂度O(n) ...
分类:其他好文   时间:2014-05-21 17:13:07    阅读次数:219
Geeks - Detect Cycle in a Directed Graph 判断图是否有环
Detect Cycle in a Directed Graph 判断一个图是否有环,有环图如下: 这里唯一注意的就是,这是个有向图, 边组成一个环,不一定成环,因为方向可以不一致。 这里就是增加一个数组保存当前已经访问过的路径信息 recStack[]; 而visited[]数组是访问过的点的信息,两者作用是不一样的。 助理这个知识点,这道题就很容易了。 原文: h...
分类:其他好文   时间:2014-05-21 15:07:14    阅读次数:269
Geeks - Union-Find Algorithm - Detect Cycle in a an Undirected Graph算法
利用Union Find的方法查找图中是否有环。 在于构建一个图数据结构,和一般图的数据结构不同的是这个图是记录了边的图,并在查找过程中不断把边连接起来,形成一个回路。 原文地址: http://www.geeksforgeeks.org/union-find/ #pragma once #include #include #include #include class Un...
分类:其他好文   时间:2014-05-21 14:12:15    阅读次数:287
POJ 2677(双调旅行商问题<bictonicTSP>
Tour Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3470 Accepted: 1545 Description John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a...
分类:其他好文   时间:2014-05-21 08:24:18    阅读次数:354
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!