Redian新闻
>
[合集] 发7道变态码工题,大家帮忙解解,3包子一题
avatar
[合集] 发7道变态码工题,大家帮忙解解,3包子一题# JobHunting - 待字闺中
S*I
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, 美东) 提到:
越是小公司要求才会越高的,这很正常
目还是很有价值
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。