Careercup - Microsoft面试题 - 5700293077499904
2014-05-12 00:02
原题:
- For a given map (ie Bing map) given longitude/latitude/ how would you design the system so that when map longitudeDelta/latitdueDelta changed you add additional pins on map for regions that was not previously cover.
- In another word, how would you design it to avoid getting and displaying duplicated pins
题目:如果地图上坐标发生了变化,如何避免重复标记地点。(题目愣是没看懂。)
解法:哈希吗?既然坐标是会变化的,那么用自增id或者其他和位置无关的值来作为哈希键值,这样就可以避免重复标记了。
代码:
- // http://www.careercup.com/question?id=5700293077499904
- Answer:
- A location on the map may change, thus using the pair of <latitude, longitude> to be the unique id is not a good id.
- Maybe using an auto-increment id is better.
- A HashMap<int, Coordinate> which maps the auto-increment id to the coordinate will allow us to change the coordinates as necessary.
- By the way, what kind of knowledge are these questions try to test? IQ, experience or inspiration?
Careercup - Microsoft面试题 - 5700293077499904的更多相关文章
- Careercup - Microsoft面试题 - 6314866323226624
2014-05-11 05:29 题目链接 原题: Design remote controller for me. 题目:设计一个遥控器. 解法:遥控什么?什么遥控?传统的红外线信号吗?我只能随便说 ...
- Careercup - Microsoft面试题 - 6366101810184192
2014-05-10 22:30 题目链接 原题: Design database locks to allow r/w concurrency and data consistency. 题目:设计 ...
- Careercup - Microsoft面试题 - 24308662
2014-05-12 07:31 题目链接 原题: I have heard this question many times in microsoft interviews. Given two a ...
- Careercup - Microsoft面试题 - 5204967652589568
2014-05-11 23:57 题目链接 原题: identical balls. one ball measurements ........ dead easy. 题目:9个看起来一样的球,其中 ...
- Careercup - Microsoft面试题 - 5175246478901248
2014-05-11 23:52 题目链接 原题: design an alarm clock for a deaf person. 题目:为聋人设计闹钟? 解法:聋人听不见,那么闪光.震动都可行.睡 ...
- Careercup - Microsoft面试题 - 5718181884723200
2014-05-11 05:55 题目链接 原题: difference between thread and process. 题目:请描述进程和线程的区别. 解法:操作系统理论题.标准答案在恐龙书 ...
- Careercup - Microsoft面试题 - 5173689888800768
2014-05-11 05:21 题目链接 原题: Complexity of a function: int func_fibonacci ( int n) { ) { return n; } el ...
- Careercup - Microsoft面试题 - 6282862240202752
2014-05-11 03:56 题目链接 原题: Given an integer array. Perform circular right shift by n. Give the best s ...
- Careercup - Microsoft面试题 - 5428361417457664
2014-05-11 03:37 题目链接 原题: You have three jars filled with candies. One jar is filled with banana can ...
随机推荐
- SQL多表查询:内连接、外连接(左连接、右连接)、全连接、交叉连接
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAADCCAIAAADrUpiXAAAGYklEQVR4nO3dQXqjuAJFYa1LC9J6tB
- PL/SQL Developer基本用法
一.新建存储过程
- js如何将纯数字字符串转换为long型
1.js如何将纯数字字符串转换为long型? js 中 int的存储位数?最大十进制数表示是多少? 精度http://www.jb51.net/article/59808.htm 整数(不使用小数点或 ...
- js方法和原型继承(一)
在js语言规范中并不存在方法这一概念,方便起见,将作为对象属性的函数成为方法this引用的规则a.在最外层代码中,this引用的是全局对象b.在函数内,this引用根据函数调用方式不同而不同函数内部的 ...
- 新浪博客如何显示高亮代码,DIY
新浪博客对代码的支持功能不尽完美,或者说一点都不好,可是对于一个追求完美的技术痴而言,代码不能够完美的显示,心里总有那么一些不爽,那么如何在新浪中显示那些带颜色的代码呢?经过探究,可以如下设置: ...
- DevExpress 重编译 替换强命名 修改源码
本文以DevExpress 11.1.8举例 必须满足几个条件 1. 必须有DXperience相应版本的全部源代码SourceCode.把全部源代码复制到X:\Program Files\DevEx ...
- C#导出GridView数据到Excel文件类
using System; using System.Web; using System.Web.UI; using System.IO; using System.Web.UI.WebControl ...
- delphi android 中 Toast 的实现(老外写的UNIT)
unit Android.JNI.Toast; // Java bridge class imported by hand by Brian Long (http://blong.com)interf ...
- Simple Shopping Cart By AngularJS
<body ng-controller='CartController'> <h1>Your Order</h1> <div ng-repeat='item ...
- python基础学习笔记第二天 内建方法(s t r)
python的字符串内建函数 str.casefold()将字符串转换成小写,Unicode编码中凡是有对应的小写形式的,都会转换str.center()返回一个原字符串居中,并使用空格填充至长度 w ...