coursera week2题目
来源:互联网 发布:华讯网络 电科软信 编辑:程序博客网 时间:2024/06/08 19:39
1 Intersection of two sets. Given two arrays a[] and b[], each containing n distinct 2D points in the plane, design a subquadratic algorithm to count the number of points that are contained both in array a[] and array b[].
Hint: shellsort (or any other subquadratic sort).
2 Permutation. Given two integer arrays of size n, design a subquadratic algorithm to determine whether one is a permutation of the other. That is, do they contain exactly the same entries but, possibly, in a different order.
Hint: sort both arrays.
3 **Dutch national flag. Given an array of n buckets, each containing a red, white, or blue pebble, sort them by color. The allowed operations are:
swap(i,j): swap the pebble in bucket i with the pebble in bucket j.
color(i): determine the color of the pebble in bucket i.
The performance requirements are as follows:
At most n calls to color().
At most n calls to swap().
Constant extra space.**
Hint: 3-way partitioning.
https://yq.aliyun.com/articles/3604
- coursera week2题目
- Coursera-Crypto1 Week2
- COURSERA Machine Learning WEEK1&&WEEK2
- Coursera机器学习 week2 assignment
- Coursera机器学习 Week2 笔记
- Coursera自然语言处理 Week2 笔记
- coursera deep learning course3 week2
- coursera deep learning course4 week2
- coursera Machine Learning Week2 学习笔记
- Coursera Machine Learning Week2 学习笔记
- 【Coursera Machine Learning】 Week2 学习笔记
- Coursera机器学习笔记(week2)
- coursera机器学习 week1&week2&week3 总结
- coursera NLP学习笔记之week2 语言模型
- Coursera Algorithm, Part2 Week2: Minimum Spanning Trees & Shortest Paths
- [Coursera机器学习]Linear Regression WEEK2编程作业
- Coursera上的Andrew Ng《机器学习》学习笔记Week2
- coursera ML笔记 ----week2 多变量的线性回归
- List set map特点及线程安全与否
- 大型网站服务器架构
- json和对象字面量的区别之一
- 时间戳与Date形式互换
- linux下解压命令大全
- coursera week2题目
- Spark学习笔记(11)源码解读之Driver中的ReceiverTracker架构
- linux系统的目录结构
- 设计模式之装饰者模式
- HDOJ1811 稍微复杂一点的拓扑排序应用
- LINUX之系统分区及挂载的概念
- Spark学习笔记(12)源码解读之Executor容错安全性
- Java —— 多线程笔记 一、线程创建、启动、生命周期、线程控制
- 2017 java程序员面试宝典