自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 Coursear week4: Interview Questions: Priority Queues

Dynamic median.Design a data type that supports insert in logarithmic time, find-the-median in constant time, and remove-the-median in logarithmic time. If the number of keys in the data type is even...

2018-12-21 17:02:12 654

原创 Coursera week4 Programming Assignment 4: 8 Puzzle

题目链接8 puzzle题意简介拼图游戏,该拼图板是一个n*n的方格,但是只放了n*n-1个卡片,有一个空卡片便于我们移动,要求最后把拼图按照从上到下从左到右的顺序放卡片(1~n*n-1),求最少的步数。题目解析1、使用A*搜索算法,其实就是BFS的变体,每次选择优先级最高的节点出队列。我们直接使用老师提供的MinPQ数据结构即可。2、剪枝。代码中设计了一个数据结构,一个私有类——No...

2018-12-21 16:57:09 413

原创 Coursera Programming Assignment 2: Deques and Randomized Queues

完整代码如下Deque.javaimport java.util.Iterator;import java.util.NoSuchElementException;public class Deque<Item> implements Iterable<Item> { private Node first, last; private int N; ...

2018-12-08 12:07:41 267

原创 《Unix 网络编程1: 套接字联网(第3版)》源码编译

注:该书官网为Unix网络编程,源码下载地址为源码1. 编译过程如下$ tar -xzvf unpv13e.tar.gz // 解压文件夹$ cd unpv13e$ ./configure // 配置$ cd lib $ make$ cd ../libfree$ make // 在该步出错,解决方法往下看$ cd ../libroute$ make //这一步可能会出...

2018-12-03 11:28:10 293

原创 InterviewQuestion: Union–Find

Social network connectivity. Given a social network containing nn members and a log file containing mm timestamps at which times pairs of members formed friendships, design an algorithm to determine ...

2018-12-01 15:53:41 340

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除