由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - [合集] 发7道变态码工题,大家帮忙解解,3包子一题
相关主题
[合集] 真诚询问,bay area VS HoustonRe: 国内的房产还是很有投资价值 (转载)
[合集] 迫切求助大家帮忙和分析,H1BPremium Processing 一波N折到去年没有pp的都是什么时候收到receipt
[合集] 出主意,帮忙分析!!Linkedin 上的 recommend (转载)
[合集] 帮忙分析一下(替朋友问)今天 Google超越苹果成为世界最有价值品牌
72.14没有啥价值,你们别猜了没刷题拿的包果然不行啊
药厂R&D on-site面试都是些什么程序呢?请教要价多少合适
RSU到底是给一定股数还是给一定价值越是年轻人,就越是个性鲜明
geekforgeek上的面经有价值么?不寄hardcopy offer, 正常吗
相关话题的讨论汇总
话题: 解解话题: 一题
进入JobHunting版参与讨论
1 (共1页)
S**I
发帖数: 15689
1
☆─────────────────────────────────────☆
alexsung (alexsung) 于 (Wed Apr 11 13:52:02 2012, 美东) 提到:
Please read and follow all instructions before beginning. For questions 1-4,
answer any two questions in any of the following programming languages (C /
C++ / Java / C# / VB / VB .NET). Please read questions carefully and answer
them to the BEST of your availability.
1. Write a function that takes as arguments two singly linked lists(unsorted
) and returns a singly linked list with nodes that exist in only one of the
input linked lists.
2. Write a function that returns the greatest product of five consecutive
digits in a 1000-digit number.
3. 1-Jan-1901 was a Monday.
The following months have exactly 30 days : April, June, September, November
The following months have exactly 31 days : January, March, May, July,
August, October, December.
February has 28 days except on leap years when it has 29 days.
A leap year occurs on any year evenly divisible by 4, but not on a century
unless it is divisible by 400.
Write a function that takes as an argument an EndDate and counts the number
of Sundays that fall on the first of the month between the dates 1-Jan-1901
and EndDate
4. Given a 2-dimensional array of integers, write a function to find cells
with values 3 through 7 inclusive, and for their horizontal and vertical
neighbors, return a single total of their values, counting each neighboring
cell towards the total once.
Example: the following 6*3 grid would produce a total of 18 by summing up
the 1's, 4's, and 5's:
9 1 9 1 1 9
1 6 1 4 5 1
9 1 9 1 1 9
For questions 6 and 7, choose just one question to answer in any one of
these object oriented languages: (C++/ Java/ C#/ VB.NET) When you are
finished please write finished at the end of the document and sign out.
Thank you for your time.
(Include the code below as part of this question)
6. A single processing queue is shared by one or more producer threads and
one or more consumer threads. Fill in the code for the producer loop and the
consumer loop.
interface IDataAccess
{
//Retrieves a batch of items to process
List GetItemsBatch();
}
interface IConsumable
{
//Processes an item
Process();
}
Queue ProcessingQueue;
class Producer
{
private IDataAccess DataAccess;
public void ProducerLoop()
{
while (running)
{
List batch = DataAccess.GetItemsBatch();
//Insert Code
}
}
}
class Consumer
{
public void ConsumerLoop()
{
while (running)
{
//Insert Code
}
}
}
(Include the code below as part of this question)
7. Implement this interface as efficiently as possible using a binary tree
to store the data. The tree does not have to be balanced.
//Represents a non-generic collection of objects that can be individually
accessed by index. Indicies are zero-based and contiguous.
interface IListLite
{
//Appends an item after the last index of the list, preserving the order of
existing items.
void AppendItem(object item);
//Inserts an item at the specified zero-based index, preserving the order
of existing items.
void InsertItem(object item, int index);
//Retrieves the item from the specified zero-based index.
object GetItem(int index);
//Retireves the current number of items in this list.
int GetItemCount();
}
☆─────────────────────────────────────☆
throttle (天心*地火) 于 (Wed Apr 11 14:10:07 2012, 美东) 提到:
感谢,今晚抽空做做。
☆─────────────────────────────────────☆
tingliu1987 (饱饭仔) 于 (Wed Apr 11 15:00:36 2012, 美东) 提到:
哪家公司的WRITTEN TEST么?
☆─────────────────────────────────────☆
alexsung (alexsung) 于 (Wed Apr 11 15:15:48 2012, 美东) 提到:
一家加州小公司。我真想破口骂,出这种变态题,还真当自己是G,M,A,F。不过,题目还是很有价值
的,希望大家共同研究,共同提高。

☆─────────────────────────────────────☆
SVMLight (Thorsten Joachims) 于 (Wed Apr 11 16:57:07 2012, 美东) 提到:
越是小公司要求才会越高的,这很正常
目还是很有价值
1 (共1页)
进入JobHunting版参与讨论
相关主题
不寄hardcopy offer, 正常吗72.14没有啥价值,你们别猜了
我也来真心求祝福吧--碰到变态老板后,明天onsite药厂R&D on-site面试都是些什么程序呢?
OPT被cash两周半了,还是没有收据,正常么RSU到底是给一定股数还是给一定价值
去面试之前,HR把题目都告诉我了,正常么?geekforgeek上的面经有价值么?
[合集] 真诚询问,bay area VS HoustonRe: 国内的房产还是很有投资价值 (转载)
[合集] 迫切求助大家帮忙和分析,H1BPremium Processing 一波N折到去年没有pp的都是什么时候收到receipt
[合集] 出主意,帮忙分析!!Linkedin 上的 recommend (转载)
[合集] 帮忙分析一下(替朋友问)今天 Google超越苹果成为世界最有价值品牌
相关话题的讨论汇总
话题: 解解话题: 一题