这个咋样?
2014 Volvo XC90 3.2
MSRP: $48,225
Your Total Savings: $4,334
Your Price: $43,891*
Vehicle Options and Description
1 Child safety seat
In-Dash single CD player
1st, 2nd and 3rd row head airbags
Independent front suspension classification
3rd Row Head Room: 35.5"
Independent rear suspension
3rd Row Hip Room: 44.5"
Instrumentation: Low fuel level
3rd Row Leg Room: 30.1"
Interior air filtration
3rd Row Shoulder Room: 54.1"
Leather sea... 阅读全帖
Your Price is 34413.00. You have the choice of 5250.00 in incentives or 3000
.00 and 0%.
这个价格怎么样?
2014 Chrysler Town & Country Touring-L with 0 miles.
This Chrysler includes:
BLACK/LIGHT GRAYSTONE, LEATHER TRIMMED BUCKET SEATS
Leather Seats
Bucket Seats
ENGINE: 3.6L V6 24V VVT (STD)
Flex Fuel Capability
V6 Cylinder Engine
TRANSMISSION: 6-SPEED AUTOMATIC 62TE (STD)
A/T
6-Speed A/T
DRIVER CONVENIENCE GROUP
Heated Rear Seat(s)
Heated Front Seat(s)
Power Door Locks
Keyless Entry
2015 Honda Pilot
MSRP: $37,850
2015 Honda Pilot
EX-L 4WD
5FNYF4H5XFB021702
View Details
IN STOCK
Estimated
Savings off MSRP
$9,700
Program Estimate
$28,150
THIS IN-STOCK VEHICLE INCLUDES
Exterior Color: Crystal Black Pearl
Interior Color: None
Options: 4.312 Axle Ratio,Heated Front Bucket Seats,Leather-Trimmed Seat
Trim,AM/FM/CD Audio System,First Aid Kit,XM Radio,4-Wheel Disc Brakes,Air
Conditioning,Electronic Stability Control... 阅读全帖
2016 Murano SL 顶配新车,所有加起来39000,这deal怎么样?
◾4.677 Axle Ratio
◾Heated Front Bucket Seats
◾Leather Appointed Seat Trim
◾Radio: AM/FM/CD Audio System w/Navigation
◾4-Wheel Disc Brakes
◾Air Conditioning
◾Electronic Stability Control
◾Front Bucket Seats
◾Leather Shift Knob
◾Navigation System
◾Tachometer
◾ABS brakes
◾Alloy wheels
◾Anti-whiplash front head restraints
◾Automatic temperature control
◾Blind spot ... 阅读全帖
Q. What is the pricing for international text messaging?
A. It's just $0.25 to send an international message. Sent messages are not
pulled from your bucket of messages. International text messages received
will either pull from your message bucket or be charged a normal per-message
charge. http://www.wireless.att.com/learn/messaging-internet/messaging/faq.jsp#general-text
So the map task will run on each machine, and data will be shuffled
so that each bucket will be on one machine, then the reduce task on
each machine will do the counting and report it to one master machine
to calculate which machine has the right bucket for the median, and
asks it to finish up the rest of the work.
Actually, this is a special Map/Reduce scenario. All the machine can pass
its distribution (over each bucket) statistic (which is small compared to
the original data) to one machine and then it can be determined that which
bucket the median is in.
suffix tree,不过真的要白板编么?能不能写下阿
key is to reduce disk access
if it is possible to keep it in memory, then first bucket files with sizes,
then inside the bucket use (MD5 => file) hash map.
ob)
thread
have no idea,求布道
生成正方形uniform分布的点,丢弃圆外面的点
笛卡尔坐标系就麻烦多了,距圆心距离不同概率不同
Open question好多,我最讨厌这种,谁知道面试官prefer什么答案阿
Does greedy algorithm work?
Use an array A to record the water volume.
Use another array B to record water needed to fill buckets.
Use the first number in B to fill first number in A.
If it is full, done. Otherwise use the second to keep filling it.
A and B are sorted.
没有搜到以前类似的题。问一下大牛们:Given a list of water buckets,you can
pour water from one to another b........
★ Sent from iPhone App: iReader Mitbbs 7.56 - iPad Lite
this problem should be an NP problem.
Reason:
Suppose bucket sizes = S/2, where S is sum of all water. question is can we
fill two buckets?
if 2 then answer to partition is yes
if 1 then no
So if we can solve this problem, then we can solve partition problem.
As I said, there's no conflict, so the order is kept. Check this:
unordered_map Class
The template class describes an object that controls a varying-length
sequence of elements of type std::pair. The sequence is
weakly ordered by a hash function, which partitions the sequence into an
ordered set of subsequences called buckets. Within each bucket a comparison
function determines whether any pair of elements has equivalent ordering.
没有哪一句说original order is kept. 只是说the sequence is weekly ordered by
a hash function. 但是有可能你第一个元素被hash到最后一个bucket里面去了;第二
个元素被hash到第一个bucket里面去了。你应该好好理解一下hash。
感觉(1)(2)(3)用一个balanced binary search tree就可以实现,key是日期,val是演
出名字,然后每个node有一个parent pointer(以实现(2)),每个node有一个int sz
member,储存子树大小(以实现(3),rank之差)
“任何演出5天之内不在重复演出”:在insert的时候先搜索要插入演出的时间,算出
其rank,然后检查该rank在[rank-5, rank+5]之间的node,看看有没有重复演出名。有
则不插入。
第(4),需要再加入一个基于separate chaining的hash table。key是演出名字,每个
bucket用balanced binary search tree实现,用来存储同一个演出的所有日期。这样
通过演出名字O(1)时间内找到对应bucket,然后search for the first node whose
key is greater than d in O(logn)(worst case, one performance with n
different dates)。
我感... 阅读全帖
感觉(1)(2)(3)用一个balanced binary search tree就可以实现,key是日期,val是演
出名字,然后每个node有一个parent pointer(以实现(2)),每个node有一个int sz
member,储存子树大小(以实现(3),rank之差)
“任何演出5天之内不在重复演出”:在insert的时候先搜索要插入演出的时间,算出
其rank,然后检查该rank在[rank-5, rank+5]之间的node,看看有没有重复演出名。有
则不插入。
第(4),需要再加入一个基于separate chaining的hash table。key是演出名字,每个
bucket用balanced binary search tree实现,用来存储同一个演出的所有日期。这样
通过演出名字O(1)时间内找到对应bucket,然后search for the first node whose
key is greater than d in O(logn)(worst case, one performance with n
different dates)。
我感... 阅读全帖
你说的查hashtable的个数,因为非空bucket不是连续排列的,所以这个操作的复杂度
是O(M),M是bucket的个数,这个耗时比O(N)还大,我试了一下你说的方法,没有
查剩余数字的个数差,而是数删掉的数字的数量,可以通过大数据,我这里用的是set
,find的复杂度实际上是O(log_n),也能通过大数据,如果换成unordered_set,会更
快。
class Solution {
public:
int longestConsecutive(vector &num) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
set myset;
int ret = -INT_MAX;
for (int i = 0; i < num.size(); i++) {
if (myset.find(num[i]) == myset... 阅读全帖
你每个bucket可以再挂一个小的hashtable,对于所有hash collision的元素重新hash
一遍(用不同的hash function), 然后2nd-level hashtable的每个bucket用数组,不
要用linked list,因为数组能存到cpu cache里面去,比linked list快很多。所以最
后的结果还是O(1)。
另外用bst,每个node有left, right children pointer,其实根本不省内存
memory average search hit
Balanced BST 64N 1.39lgN
Hashtable 32N~128N <2.5
cited from pp. 487 <> by Sedgewick