Bloomberg LP Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

std::sort<int *>(v, v+(sizeof(v)/sizeof(v[0])))
template type can be omitted above - compiler will infer it.

- acoader@gmail.com January 28, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

std::sort( Array, Array + 10 );

- Anonymous February 02, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

As another example code, let us use vector instead of array assuming the array will be referred multiple times
// pseudo code
// 1. define vector and initialize it with array v[1000]
vector<int> vec(1000);
int i;
for(i=0; i<1000; i++) v.push_back(v[i]);
// 2. use sort algorithm
sort(vec.begin(), vec.end());

- drwolf February 26, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

errata correction: for(i=0; i<1000; i++) v.push_back(v[i]);

for(i=0; i<1000; i++) vec.push_back(v[i]);

- drwolf February 26, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

http://www.codeproject.com/KB/cpp/Sort.aspx

- Anonymous August 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I agree with Jaganlal.. Interviewrs who asks syntax are biggest idiots..

- DP October 15, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

may be the interviewer didn't like the interviewee's face, that is why he asked the question to piss him off.

- Anonymous January 04, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

may be the interviewer didn't like the interviewee's face, that is why he asked the question to piss him off.

- Anonymous January 04, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

So girls should dress up? And ugly girls should never show up......
Or try to remember the whole reference.

- Xiao January 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

std::sort(&v[0], &v[1000]) ;

- Anonymous January 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

cool

- siva.sai.2020 May 13, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The C++11 way:

sort(begin(v), end(v));

(Using namespace std implied.)

- stachenov October 20, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Refer MSDN. ask iviewer to ask concepts, not syntax and method calls

- Jaganlal January 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 votes

Agree. Interviewer seems to be an idiot.

- LOLer August 10, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

if you have experience in C++, you should be able to provide syntax. Merely concept will not prove your efficiency.

- keyurpatel80 May 15, 2013 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More