2014-05-01 02:13

题目链接

原题:

Design question: Say you have hacked in to a network and can deploy your bot thousands of machines, how would you design your bot so that all the machines work together to download a website, say wikipedia. There should be load balancing and a page should be queryable given its URL.

题目:如果你已经黑了几千台电脑,如何设计机制来用这些肉鸡来协同下载一个完整的网站,比如Wikipedia?要求能够提供查询机制,确定特定的网址被下载到了哪台特定的机器。

解法:这是设计题,肯定没法写出代码了。我只能凭自己能想到的地方,写了几句分析。

代码:

 // http://www.careercup.com/question?id=4922014007558144
Answer:
If you've got ahold of a bunch of bots, you may regard it as a heterogeneous group. Different OS, different configuration.
You may choose one or more bot machines as scheduling server, and the rest of them as working server.
The query URLs will be tranformed into digital sign, so as to decide which bot will perform what downloads.
In case that some of the machines lost contact or broke down, others will make up for the loss.

Careercup - Facebook面试题 - 4922014007558144的更多相关文章

  1. Careercup - Facebook面试题 - 6026101998485504

    2014-05-02 10:47 题目链接 原题: Given an unordered array of positive integers, create an algorithm that ma ...

  2. Careercup - Facebook面试题 - 5344154741637120

    2014-05-02 10:40 题目链接 原题: Sink Zero in Binary Tree. Swap zero value of a node with non-zero value of ...

  3. Careercup - Facebook面试题 - 5765850736885760

    2014-05-02 10:07 题目链接 原题: Mapping ' = 'A','B','C' ' = 'D','E','F' ... ' = input: output :ouput = [AA ...

  4. Careercup - Facebook面试题 - 5733320654585856

    2014-05-02 09:59 题目链接 原题: Group Anagrams input = ["star, astr, car, rac, st"] output = [[& ...

  5. Careercup - Facebook面试题 - 4892713614835712

    2014-05-02 09:54 题目链接 原题: You have two numbers decomposed in binary representation, write a function ...

  6. Careercup - Facebook面试题 - 6321181669982208

    2014-05-02 09:40 题目链接 原题: Given a number N, write a program that returns all possible combinations o ...

  7. Careercup - Facebook面试题 - 5177378863054848

    2014-05-02 08:29 题目链接 原题: Write a function for retrieving the total number of substring palindromes. ...

  8. Careercup - Facebook面试题 - 4907555595747328

    2014-05-02 07:49 题目链接 原题: Given a set of n points (coordinate in 2d plane) within a rectangular spac ...

  9. Careercup - Facebook面试题 - 5435439490007040

    2014-05-02 07:37 题目链接 原题: // merge sorted arrays 'a' and 'b', each with 'length' elements, // in-pla ...

随机推荐

  1. Mac OSX系统搭建React natvie for android 开发环境

    1.下载node.js  https://nodejs.org/en/ 下载OSX版本 V5.6  2.安装android SDK  JDK  3.安装react-native-cli 打开命令行,输 ...

  2. 【转载】MQTT学习笔记——MQTT协议体验 Mosquitto安装和使用

    http://blog.csdn.net/xukai871105/article/details/39252653 0 前言     MQTT是IBM开发的一个即时通讯协议.MQTT是面向M2M和物联 ...

  3. Ubuntu 16.04 - python3 安装mysql驱动

    阿西吧,今天碰到一件特别蛋疼的事,给Ubuntu安装Python的MySQL驱动,驱动显示安装成功了 pip install mysql-connector 但是 在程序中导入,老是报错. Trace ...

  4. 关于GrideView Item点击后出现错乱重叠的情况

    我在一个搜索页做了一个筛选信息的功能 大概思路如下:在根布局中用Include 引入一个筛选框(如图), 然后把边距设置为 android:layout_marginBottom="-250 ...

  5. WampServer修改Mysql密码的步骤

    1.安装成功后,通过 phpmyadmin 进入mysql,点击上面的 [用户] 菜单,在用户[root]主机[localhost]点击编辑权限,下面有一个选项[修改密码],输入您想要的密码,如:12 ...

  6. arcgis js api 本地化配置

    配置arcgis library 根目录的init.js的 "baseUrl:",使其指向正确的地址

  7. ionic项目相关的操作命令

     更新npmD:\Program Files\npm-3.9.0\npmnode cli.js install npm -gf vs安装 更新node.js  windows版直接从官网下载安装包 n ...

  8. 特殊的attribute机制

    __attribute__机制是GNU C的一大特色,可以用来设置函数,变量和数据类型的属性,下面对工作中正好用到的两个属性做下简单介绍. 1. constructor 这个属性指定函数在main函数 ...

  9. 使用 Time Machine 恢复 .ssh等隐藏文件夹

    重装MAC系统后,要恢复.ssh等文件夹内容,而其在“Finder”中又是默认隐藏的,这时我们可以先在“Finder”中使用“前往文件夹功能…”进入指定文件夹,然后再进入“Time Machine”进 ...

  10. C#操作Excel基本操作

    /// using Microsoft.Office.Core; using Microsoft.Office.Interop.Excel; using System.IO; using System ...