先附上challenge要求: 博主最近在刷coursera普林斯顿大学算法课part1部分的作业,Programming Assignment2最后的这个extra challenge当初想了一段时间.最开始的想法就是创建一个RandomizedQueue对象,然后先让前k个String入队,后面的每读一个String以一定概率让它入队,不过之前需要让RandomizedQueue出队一个String.标准输入读完之后,得到一个k个String的RandomizedQueue,然后随机出队打印…
作业地址:http://coursera.cs.princeton.edu/algs4/assignments/8puzzle.html 作业难点: 1.如何求一个Puzzle的解? 根据作业提示,使用MinPQ将GameTree的不同状态以hamming或manhattan方法求得优先级,加入MinPQ队列,并对min值进行分析,直到达到最后状态.需要自定义MinPQ使用的数据结构. 2.如何在有限步的情况下判断一个Puzzle是否有解? 根据作业提示,如果Twin有解那么原始Puzzle就无…
作业地址:http://coursera.cs.princeton.edu/algs4/assignments/kdtree.html 作业难点: 1.如何构建KdTree,使用什么样的数据结构? 根据作业提示: private static class KdNode { private Point2D point; private boolean direction; private RectHV rect; private KdNode lb, rt; KdNode(Point2D p, b…
Planar data classification with a hidden layer Welcome to the second programming exercise of the deep learning specialization. In this notebook you will generate red and blue points to form a flower. You will then fit a neural network to correctly cl…
作业原文:http://coursera.cs.princeton.edu/algs4/assignments/queues.html 这次作业与第一周作业相比,稍微简单一些.有三个编程练习:双端队列(Deque)设计.随机队列(Randomized Queue)设计,还有一个排列组合类Permutation. 一.双端队列Deque 设计要求:A double-ended queue or deque (pronounced "deck") is a generalization o…
Programming Assignment 3: Pattern Recognition 1.题目重述 原题目:Programming Assignment 3: Pattern Recognition 题目给定n个二维平面点,搜索能够连成线的大于等于四个点的集合.需要分别实现三个类,点的类,暴力搜索,快速搜索. 点的类需要实现根据点的坐标比较以及两个点根据某个点的斜率的比较. 暴力搜索和快速搜索均需要实现寻找点的功能. 2.分析 主要是分析如何实现暴力搜索和快速搜索. 2.1 暴力搜索 这个…
蒲公英 · JELLY技术期刊 Vol.42 这是一个最好的时代,多样化的平台给了所有人成长发展的机会,各种需求和解决需求的人让人大开眼界:但这也并不是完美的时代,"前端还需要懂什么算法?"."中国人不需要隐私!!"."写个 PPT 还需要耗费时间?"--言路畅通也带来很多无畏的恶意,但天光台高未百尺,下眺林岭如屏帷,当我们站得足够高时,原本的知见障就不再是一个问题. 就好像 Trekhleb 的 JS 算法课:保护隐私也并不是用户在孤军奋战,同…
编程作业二 作业链接:Deques and Randomized Queues & Checklist 我的代码:Deque.java & RandomizedQueue.java & Permutation.java 问题简介 Write a generic data type for a deque and a randomized queue. The goal of this assignment is to implement elementary data struct…
自我总结: 1.编程的思维不够,虽然分析有哪些需要的函数,但是不能比较好的汇总整合 2.写代码能力,容易挫败感,经常有bug,很烦心,耐心不够好 题目: In this programming assignment you will implement one or more of the integer multiplication algorithms described in lecture. To get the most out of this assignment, your pro…
Please note that when you are working on the programming exercise you will find comments that say "# GRADED FUNCTION: functionName". Do not edit that comment. The function in that code block will be graded. 1) What is a Jupyter notebook? A Jupyt…