Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1750515
  • 博文数量: 297
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 3006
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-06 22:04
个人简介

Linuxer, ex IBMer. GNU https://hmchzb19.github.io/

文章分类

全部博文(297)

文章存档

2020年(11)

2019年(15)

2018年(43)

2017年(79)

2016年(79)

2015年(58)

2014年(1)

2013年(8)

2012年(3)

发布时间:2016-06-21 10:37:05

本文内容基本上出自: Grokking.Algorithms.An.illustrated.guide.for.programmers.and.other.curious.peopleBFS:解决什么问题?1. Is there a path from node A to node B?2. What is the shortest path from node A to node B?适用于无权重的图,以前的帖子里面的wordladder问题,也是BFS的应用。w.........【阅读全文】

阅读(1356) | 评论(0) | 转发(0)

发布时间:2016-05-19 21:32:00

有两个序列a,b,大小都为n,序列元素的值任意整形数,无序;要求:通过交换a,b中的元素,使[序列a元素的和]与[序列b元素的和]之间的差最小。这道题我看网上有很多递归的解法,都是错误的,先假设了两个序列只需要加上最后两个元素就能完成这个题目。这种解法得到的结果不是最小的。正确的思路在这里:http://bbs.chin.........【阅读全文】

阅读(1387) | 评论(0) | 转发(0)

发布时间:2016-04-26 11:52:17

set is an unordered collection of elements,is a map in which keys do not have associated values. python have builtins frozenset and set.frozenset is an immutable form. these are implemented using hash table.点击(此处)折叠或打开from collections import MutableSet&nbs.........【阅读全文】

阅读(1936) | 评论(1) | 转发(0)

发布时间:2016-04-06 21:45:10

代码多是参照这里的:http://interactivepython.org/run ... dLadderProblem.html首先是Graph 和Vertex 类点击(此处)折叠或打开class Vertex:    def __init__(self,key,distance=0,pred=None,color="white"):    &nbs.........【阅读全文】

阅读(1439) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

fireboyz20052010-11-10 18:27

HI, 看到你"http://bbs.chinaunix.net/viewthread.php?tid=1806065"

这里的提问,你是不是在看一本叫《Shell脚本专家指南》的书?我也在阅读,我新手,不如大家交流一下,看到不明白也可以大家一起研究研究。

我的qq是:369035906
或gtalk:jiale.chan@gmail.com

回复  |  举报
留言热议
请登录后留言。

登录 注册