找回密码
 FreeOZ用户注册
查看: 7713|回复: 9
打印 上一主题 下一主题

[面试话题] Macquarie Bank Java/C++程序员,第一轮编程笔试题目分享

[复制链接]
跳转到指定楼层
1#
发表于 28-2-2010 15:00:41 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
Macquarie Bank,中文名好像叫麦格理银行。我来澳大利亚之前从来没听说过它,所以起初以为是个小公司。其实它是一家提供银行、金融、顾问、投资和基金管理服务的全球性金融集团,是澳洲投资银行界的泰山北斗。它有“百万富翁工厂”之称。如果能进这公司,钱途大大的。

我的澳洲找工历程,第一家中介给介绍的有希望的就是这公司。可以最终还是梦断Macquarie了。感觉Macquarie Bank招人还是很多的,有兴趣的移友可以自己上他们的网站申请。中介可能帮不了啥忙,因为这公司太牛气了,中介也是通过网站提交申请的。在Macquarie的网站申请后一般可能在两个星期内,他们给你发IKM的测试(这是网上的多选技术测试题)让你做,然后是多轮技术笔试,和多轮面试,最后还有心理测试,招聘过程极其复杂而漫长。

这个题目,第三道有相当难度。可能需要Google一下才能弄懂题目的意思。我的C++实现就暂时不贴出来了,以免影响有心人的思考。
---------------------------------------------------------------------------------------------------------------------------------------------------------------

ITG FICC Development Questions


This test comprises three questions which can be completed on a computer using a C++ or Java compiler. The work should be completely your own and your implementations should focus on maintainability and execution speed.

There is no time limit to complete this test, but please record how long it took to complete each question.

Each question can be completed in C++ or Java. You do not have to implement the questions in both languages.



Question 1
Write a method to determine if a given string is a palindrome (e.g. "Madam I'm Adam", or "A man, a plan, a canal, Panama").

The prototype for the function is:

C++:
bool is_palindrome(char const * str)
Java:
boolean isPalindrome(String str);


a) Provide an implementation for this function in either C++ or Java.
b) What assumptions does your code make?
c) Did you use a compiler to assist with this?
d) How long did it take to do this question?

Question 2
In this question you will implement some features of a hypothetical message logging class. There is no one correct answer to this question – it is a chance for you to demonstrate your ability to write good C++/Java.

The message logging class will be used within an application to log progress messages as the application runs. Messages have different levels as follows:

1 = Error, 2 = Warning, 3 = Information, 4 = Debug, 5 = Trace.

You have been provided with the following class definition to start you off. You may change the data types being used if that helps the implementation.

C++:
class MessageLogger
{

public
:
    void addMessage(int messageLevel, const string& message);

    bool getNextMessage(time_t& when, int& messageLevel, string& message);
};

Java:

class Message
{

public Date when;


public
int messageLevel;

public String msg;

};

class MessageLogger
{

public void
addMessage(int messageLevel, String msg);

    public Message getNextMessage();
};

a) Implement the addMessage and getNextMessage methods. Add whatever methods and data you need to support those methods. You should make the following assumptions:

· addMessage is called periodically to add new messages to the log. The log stores a copy of each message added.
· getNextMessage is called to retrieve the next message in the log in time sequence.
   o The C++ function should return false if there is no messages available and return true (and set the reference items) if there is a message available.
   o The Java function should return a null Message object if there is no message available.
· Hundreds of thousands of messages will be logged but they will fit in the available memory (so you do not need to write them to disk).

b) Implement a method that takes message level as an argument which can be used to get all the messages and the times they occurred for the specified level. For example, passing Warning would return all the warning messages and the times they happened.

c) Implement a method similar to getNextMessage that returns the next most critical oldest message. For example, if the logger contains the following messages:

    10:30, Information, “Startup”
    10:35, Warning, “Low memory”
    10:39, Information, “Logged on”
    10:42, Error, “Connection lost”

and the method were called four times then the following messages would be returned:

    10:42, Error, “Connection lost”
    10:35, Warning, “Low memory”
    10:30, Information, “Startup”
    10:39, Information, “Logged on”

d) What was the most difficult part of completing this question?
e) Did you use a compiler to assist you with this response?
f) How long did it take to do this question?



Question 3
You have been asked to implement an Anagram Solver that generates all the anagrams for the alphabetic letters in a given word or phrase with words that occur in a provided dictionary.

· The dictionary exists in a plain text file that has been provided to you.
· The dictionary file will change daily by another process that will never be executing when your solver is executing.
· The dictionary is formed of strings of 12 or less alphabetic ASCII characters.
· The input phrase will be a character string that will be passed in as the first argument on the command line.
· Non-alphabetic characters in the input phrase should be ignored, E.g. “the plane!” is considered an anagram of “alpethene”
· The dictionary will contain approximately 1,000,000 words.
· The program must write to stdout all permutations of the input string found in the dictionary.
· The program should return 1 if anagrams are found, 0 if no anagrams are found, and 2 on an execution error.

a) Provide an implementation for the above program in C++ or Java.
b) If the dictionary is scaled up to 1,000,000,000 words and we want to run a significant volume of matches per day would this change your implementation and if so how?
c) What was the most difficult part of completing this question?
d) Did you use a compiler to assist you with this response?
e) How long did it take to do this question?

[ 本帖最后由 joen 于 28-2-2010 15:15 编辑 ]
回复  

使用道具 举报

2#
发表于 28-2-2010 17:40:46 | 只看该作者
做个记号,该天来做。
回复  

使用道具 举报

3#
发表于 28-2-2010 19:40:16 | 只看该作者
MQ招人要求还是很高的,稍微有点投行的样子
回复  

使用道具 举报

4#
 楼主| 发表于 1-3-2010 00:30:56 | 只看该作者
回复  

使用道具 举报

5#
发表于 1-3-2010 00:55:08 | 只看该作者
看到差距,留名。
回复  

使用道具 举报

6#
发表于 19-3-2010 21:46:17 | 只看该作者
学习一下
回复  

使用道具 举报

7#
发表于 20-3-2010 12:44:59 | 只看该作者


留个脚印,等合适的时候来学习。
回复  

使用道具 举报

8#
发表于 20-3-2010 13:51:44 | 只看该作者
上次做了一次这个题,就没有消息了
回复  

使用道具 举报

9#
发表于 20-3-2010 21:51:01 | 只看该作者
挺有难度, 偏基础。

这样的面试题,工资应该100k起吧?
回复  

使用道具 举报

10#
 楼主| 发表于 21-3-2010 16:43:43 | 只看该作者
原帖由 bfox 于 20-3-2010 21:51 发表
挺有难度, 偏基础。

这样的面试题,工资应该100k起吧?

百万富翁工厂。只要能进去,10W根本算不了啥。
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+11, 5-12-2026 05:01 , Processed in 0.020169 second(s), 26 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表