E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
CareerCup
Careercup
- Google面试题 - 5732809947742208
2014-05-03 22:10 题目链接 原题: Given a dictionary, and a list of letters ( or consider as a string), find the longest word that only uses letters from the string. [I didn't meet this question, what's t
·
2015-10-31 09:22
Google
Careercup
- Google面试题 - 5735304249999360
2014-05-03 23:18 题目链接 原题: Insert a element in a sorted circular linked list 题目:题意简单明了,向一个有序的循环单向链表中插入元素,使得链表仍然有序。 解法:由于是循环链表,所以表尾指向表头。链表只能顺序访问,不额外添加数据的情况下就没法以对数的时间进行查找了。有几个边缘情况需要考虑:1. 链表为空 2. 插
·
2015-10-31 09:22
Google
Careercup
- Google面试题 - 4557716425015296
2014-05-03 21:57 题目链接 原题: Many sticks with length, every time combine two, the cost is the sum of two sticks' length. Finally, it will become a stick, what's the minimum cost? 题目:有很多根长度不同的棍子,每次选
·
2015-10-31 09:22
Google
Careercup
- Google面试题 - 5205167846719488
2014-05-03 23:35 题目链接 原题: For a given node in binary search tree find a next largest number in search tree. 题目:给定一个二叉搜索树的节点,找出此节点在树中的中序后继节点,也就是比它大的最小节点。 解法:右子树向左走到底,左祖先走到顶向右。草稿纸上一画图就清楚了。 代码:
·
2015-10-31 09:22
Google
Careercup
- Facebook面试题 - 6321181669982208
2014-05-02 09:40 题目链接 原题: Given a number N, write a program that returns all possible combinations of numbers that add up to N, as lists. (Exclude the N+0=N) For example, if N=4 return {{1,1,1
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 23594662
2014-05-02 03:19 题目链接 原题: Given a sequence of numbers A(1) ..A(n), find the continuous subsequenceA(i)..A(j) for which the sum of elements is maximum. condition: we should not select two conti
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 23869663
2014-05-02 03:37 题目链接 原题: A string is called sstring if it consists of lowercase english letters and no two of its consecutive characters are the same. You are given string s of length n. Calc
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 5761467236220928
2014-05-02 07:06 题目链接 原题: Given an array of randomly sorted integers and an integer k, write a function which returns boolean True if a pair of numbers exists in the array such that A[i] + A[j] =
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 5188884744896512
2014-05-02 07:18 题目链接 原题: boolean isBST(const Node* node) { // return true iff the tree with root 'node' is a binary search tree. // 'node' is guaranteed to be a binary tree. } n / \
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 4907555595747328
2014-05-02 07:49 题目链接 原题: Given a set of n points (coordinate in 2d plane) within a rectangular space, find out a line (ax+by=c), from which the sum of the perpendicular distances of all the point
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 5177378863054848
2014-05-02 08:29 题目链接 原题: Write a function for retrieving the total number of substring palindromes. For example the input is 'abba' then the possible palindromes= a, b, b, a, bb, abba So the
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 5435439490007040
2014-05-02 07:37 题目链接 原题: // merge sorted arrays 'a' and 'b', each with 'length' elements, // in-place into 'b' to form a sorted result. assume that 'b' // has 2*length allocated space. // e
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 4892713614835712
2014-05-02 09:54 题目链接 原题: You have two numbers decomposed in binary representation, write a function that sums them and returns the result. Input: 100011, 100100 Output: 1000111 题目:做二进制加法。
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 5765850736885760
2014-05-02 10:07 题目链接 原题: Mapping '1' = 'A','B','C' '2' = 'D','E','F' ... '9' = input: 112 output :ouput = [AAD, BBD, CCD, AAE, AAF, BBE, BBF, CCE, CCF] 题目:电话的数字按键和字母有个映射关系,给定一串数字,
·
2015-10-31 09:21
Facebook
Careercup
- Facebook面试题 - 5998719358992384
2014-05-02 00:22 题目链接 原题: Given a matrix consisting of 0's and 1's, find the largest connected component consisting of 1's. 题目:给定一个01矩阵,找出由1构成的连通分量中最大的一个。 解法:四邻接还是八邻接也不说,我就当四邻接了。这种Flood Fill问题,
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 5890898499993600
2014-05-01 02:30 题目链接 原题: Given a matrix of letters and a word, check if the word is present in the matrix. E,g., suppose matrix is: a b c d e f z n a b c f f g f a b c and given word is f
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 4922014007558144
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 t
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 6139456847347712
2014-05-01 01:50 题目链接 原题: Microsoft Excel numbers cells as 1...26 and after that AA, AB.... AAA, AAB...ZZZ and so on. Given a number, convert it to that format and vice versa. 题目:微软的Office Exc
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 5671785349513216
2014-05-02 01:05 题目链接 原题: bool anaStrStr (string needle, string haystack) { } Write a function that takes 2 strings , search returns true if any anagram of string1(needle) is present in stri
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 6204973461274624
2014-05-02 02:28 题目链接 原题: I/P: N, k O/P: all subset of N with exactly K elements. eg: I/p: N = 5, K =3 O/p: 1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 2 3 4 2 3 5 3 4 5 题目:从N个数中选K
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 5729456584916992
2014-05-02 00:59 题目链接 原题: Given a normal binary tree, write a function to serialize the tree into a string representation (returning the string), and also a function to deserialize a serialized st
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 4713484755402752
2014-05-02 00:30 题目链接 原题: Given two arrays of sorted integers, merge them keeping in mind that there might be common elements in the arrays and that common elements must only appear once in the me
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 6685828805820416
2014-05-02 02:33 题目链接 原题: Given the following 3 by 3 grid where the (first row, first column) is represented by (0,0): 0,1 1,2 3,3 1,1 3,3 3,2 3,0 1,3 null we need to find if we can ge
·
2015-10-31 09:20
Facebook
Careercup
- Facebook面试题 - 5179916190482432
2014-05-01 00:45 题目链接 原题: input [2,3,1,4] output [12,8,24,6] Multiply all fields except it's own position. Restrictions: 1. no use of division 2. complexity in O(n) 题目:给定一个整数数组,将个元
·
2015-10-31 09:19
Facebook
Careercup
- Facebook面试题 - 6299074475065344
2014-05-01 01:00 题目链接 原题: Given a matrix with 1's and 0's, a rectangle can be made with 1's. What is the maximum area of the rectangle. 00010 11100 11110 11000 11010 In this test case
·
2015-10-31 09:19
Facebook
Careercup
- Facebook面试题 - 4909367207919616
2014-05-01 01:23 题目链接 原题: WAP to modify the array such that arr[I] = arr[arr[I]]. Do this in place i.e. with out using additional memory. example : if a = {2,3,1,0} o/p = a = {1,0,3,2}
·
2015-10-31 09:19
Facebook
Careercup
- Facebook面试题 - 5110993575215104
2014-04-30 16:12 题目链接 原题: The beauty of a number X is the number of 1s in the binary representation of X. Two players are plaing a game. There is number n written on a black board. The game is
·
2015-10-31 09:19
Facebook
Careercup
- Facebook面试题 - 5412018236424192
2014-05-01 01:32 题目链接 原题: Given a linked list where apart from the next pointer, every node also has a pointer named random which can point to any other node in the linked list. Make a copy of the
·
2015-10-31 09:19
Facebook
[
CareerCup
] 13.6 Virtual Destructor 虚析构函数
13.6Whydoesadestructorinbaseclassneedtobedeclaredvirtual? 这道题问我们为啥基类中的析构函数要定义为虚函数。首先来看下面这段代码:classFoo{ public: voidf(); }; classBar:publicFoo{ public: voidf(); }; Foo*p=newBar(); p->f();
Grandyang
·
2015-10-31 06:00
[
CareerCup
] 13.5 Volatile Keyword 关键字volatile
13.5Whatisthesignificanceofthekeyword"volatile"inC 这道题考察我们对于关键字volatile的理解,顾名思义,volatile有易变的易挥发的意思,在C/C++里,表示告知编译器某个变量可能会由程序外部改变,比如操作系统,硬件或者其他的线程。由于变量会由无法预期的改变,所有编译器每次都需要从内存中读取变量值。我们可以如下定义一个整型变量为vola
Grandyang
·
2015-10-31 04:00
[
CareerCup
] 13.4 Depp Copy and Shallow Copy 深拷贝和浅拷贝
13.4Whatisthedifferencebetweendeepcopyandshallowcopy?Explainhowyouwoulduseeach. 这道题问深拷贝和浅拷贝的区别。浅拷贝复制对象中所有的成员值到另一个对象中,而深拷贝不仅复制这些,还复制所有的指针对象,参见下面代码:structTest{ char*ptr; }; voidshallow_copy(Test&s
Grandyang
·
2015-10-31 03:00
Careercup
- Microsoft面试题 - 5718181884723200
代码: 1 // http://www.
careercup
.com/question
·
2015-10-30 13:13
Microsoft
Careercup
- Microsoft面试题 - 5173689888800768
2014-05-11 05:21 题目链接 原题: Complexity of a function: int func_fibonacci ( int n) { if (n < 2) { return n; } else { return ( func_fibonacci(n-1) + func_fibonacci(n-2)); } }
·
2015-10-30 13:13
Microsoft
Careercup
- Microsoft面试题 - 6314866323226624
2014-05-11 05:29 题目链接 原题: Design remote controller for me. 题目:设计一个遥控器。 解法:遥控什么?什么遥控?传统的红外线信号吗?我只能随便说说思路吧。不知道这算什么类型的面试题,真遇到的话也算是倒了霉了。想了半天恍然大悟:原来是考察设计模式。查了相关资料后发现命令模式比较符合题意,所以就依葫芦画瓢写了个例子。 代码:
·
2015-10-30 13:13
Microsoft
Careercup
- Microsoft面试题 - 5428361417457664
2014-05-11 03:37 题目链接 原题: You have three jars filled with candies. One jar is filled with banana candies, one jar is filled with lemon candies and one jar has a mix of both. All the jars are misla
·
2015-10-30 13:12
Microsoft
Careercup
- Microsoft面试题 - 6543214668414976
2014-05-11 02:56 题目链接 原题: Write a function called FooBar that takes input integer n and prints all the numbers from 1 upto n in a new line. If the number is divisible by 3 then print "Foo&quo
·
2015-10-30 13:12
Microsoft
Careercup
- Microsoft面试题 - 6282862240202752
2014-05-11 03:56 题目链接 原题: Given an integer array. Perform circular right shift by n. Give the best solution. 题目:给数组进行循环移位,给出最优解。 解法:首先要考虑n的范围,对于负数和超过数组长度的数,先进行取模操作。然后用三次反转数组就可以完成循环移位。 代码:
·
2015-10-30 13:12
Microsoft
Careercup
- Microsoft面试题 - 5684901156225024
2014-05-10 23:45 题目链接 原题: Arrange the numbers in an array in alternating order. For example if the array is [a1, a2, a3, a4.. ]arrange the array such that b1<=b2>=b3<=b4 and so on. Sa
·
2015-10-30 13:11
Microsoft
Careercup
- Microsoft面试题 - 5673934611546112
2014-05-10 23:26 题目链接 原题: what is the best,worst and average case complexity for fibonacci no.s ..explain? 题目:计算斐波那契数的最好、最坏、平均复杂度是多少? 解法:计算斐波那契数倒是有好多方法,不过平均复杂度是怎么个说法?我写了三种解法:1. 白痴级的二路递归,复杂度是指数级
·
2015-10-30 13:11
Microsoft
Careercup
- Microsoft面试题 - 5120588943196160
2014-05-10 22:58 题目链接 原题: Three points are given A(x1, y1), B(x2, y2), C(x3, y3). Write a method returning an array of points (x, y) inside the triangle ABC. 题目:给定三个点,找出所有这三点组成的三角形内的整点。(不能组成三角形也
·
2015-10-30 13:11
Microsoft
Careercup
- Microsoft面试题 - 5943729928011776
2014-05-10 21:56 题目链接 原题: Suppose you get number of unique users every second from bing For eg, 2,4,5,1,2,etc You need to write a web service method , such that it takes the input n, which ret
·
2015-10-30 13:10
Microsoft
Careercup
- Microsoft面试题 - 6366101810184192
2014-05-10 22:30 题目链接 原题: Design database locks to allow r/w concurrency and data consistency. 题目:设计一个支持并行读写并保证数据一致性的数据库锁。 解法:这是什么范畴的面试题?对于我这种完全没有相关项目经验的人,还真是无从下手。翻了书之后顺便重新复习了一下共享锁、互斥锁的概念。说白了,这
·
2015-10-30 13:10
Microsoft
Careercup
- Microsoft面试题 - 5649647234187264
2014-05-10 22:17 题目链接 原题: A draw method is given, write a function to draw a chess board. The Draw method, draws a square and has parameters row position, column position and color. 题目:给定一个draw
·
2015-10-30 13:10
Microsoft
Careercup
- Microsoft面试题 - 4840369632051200
2014-05-10 07:06 题目链接 原题: Suppose you have a collection of collection Eg : CEO-> Vps-> GMs ->.. CEO will contain collection of VP's, VP's will have collection of GM's and so on. Sup
·
2015-10-30 13:09
Microsoft
Careercup
- Microsoft面试题 - 5680049562845184
2014-05-10 06:51 题目链接 原题: "How would you find the number of gas stations in the United States?" *You cannot look up any concrete information (like the average number of gas stations
·
2015-10-30 13:09
Microsoft
Careercup
- Microsoft面试题 - 6337018766295040
2014-05-10 06:38 题目链接 原题: What do you think is the next big thing in technology? For example, search engine is Google, social media is Facebook, etc. etc... 题目:你觉得下一个IT界的热点是什么?Google有搜索引擎,Facebo
·
2015-10-30 13:09
Microsoft
Careercup
- Microsoft面试题 - 5752271719628800
2014-05-10 20:31 题目链接 原题: Given an array of integers and a length L, find a sub-array of length L such that the products of all integers are the biggest. Example: Input: {4, 1, -7, -8, 9}, 3
·
2015-10-30 13:09
Microsoft
Careercup
- Google面试题 - 5680330589601792
2014-05-08 23:18 题目链接 原题: If you have data coming in rapid succession what is the best way of dealing with redundant data? 题目:如果你有大量数据流入,如何处理冗余数据? 解法:又是“Guy”出的题,题意不清,没有情景。神马意思?做个Cache吧。 代码:
·
2015-10-30 13:08
Google
Careercup
- Google面试题 - 5085331422445568
2014-05-08 23:45 题目链接 原题: How would you use Dijkstra's algorithm to solve travel salesman problem, which is to find a shortest path from a starting node back to the starting node and visits all ot
·
2015-10-30 13:08
Google
Careercup
- Google面试题 - 5377673471721472
2014-05-08 22:42 题目链接 原题: How would you split a search query across multiple machines? 题目:如何把一个搜索query分发到多个机器上? 解法:又是“Guy”出的题目。对query字符串算取数字签名,然后对集群的机器数量取模,就可以得到对应落在的机器了。 代码: 1 // http://ww
·
2015-10-30 13:08
Google
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他