Open Side Menu Go to the Top
Register
Interview  Test Questions Problems, Solutions, Links, Discussion Interview  Test Questions Problems, Solutions, Links, Discussion

08-14-2016 , 03:13 PM
Sounds like a pretty standard three tier app. Some "endpoints" can change state of single data structure and presentation layer consumes other, etc. Make sure to use proper http methods and status code, etc. They want you to host it and write a technical document.

I remember I had a couple of those tests way before and I am happy I decided to decline. It just looks like they could be fishing for info for some technology / design techniques. If you wanna troll you can ask them to sign NDA to prevent this.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-14-2016 , 11:33 PM
Quote:
Originally Posted by adios
I will be interested in the feedback you get from VMWare. VMWare contacted me about a position a year or so ago. From the job description it appeared that I was marginally qualified so I passed on taking the test.
There were 6 questions with one hour to complete. I was only able to complete the first question :\. I got slaughtered. They are clearly looking for good programmers. I would say all of the questions except the first were medium difficulty on leetcode. Questions were doable if you compete often on hacker rank.

I am really rusty with coding challenges so I'll need to work on this more .

On the bright side, my EPI (elements of programming interviews) book was shipped today. Will be grinding through that.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-14-2016 , 11:37 PM
Oh that's hilarious, right when I posted that. I walked out of my room and met my new roommate. Turns out he works for vmware.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 01:45 AM
Quote:
Originally Posted by bex989
Sounds like a pretty standard three tier app. Some "endpoints" can change state of single data structure and presentation layer consumes other, etc. Make sure to use proper http methods and status code, etc. They want you to host it and write a technical document.

I remember I had a couple of those tests way before and I am happy I decided to decline. It just looks like they could be fishing for info for some technology / design techniques. If you wanna troll you can ask them to sign NDA to prevent this.
Could go super meta and make the app a convoluted NDA form?

The company isn't a small company. They have offices all across America and is rated 4.5 stars on glassdoor. I also got two emails from them thanking me for signing up for the test.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 07:07 AM
Quote:
Originally Posted by Barrin6
There were 6 questions with one hour to complete. I was only able to complete the first question :\. I got slaughtered. They are clearly looking for good programmers. I would say all of the questions except the first were medium difficulty on leetcode. Questions were doable if you compete often on hacker rank.

I am really rusty with coding challenges so I'll need to work on this more .

On the bright side, my EPI (elements of programming interviews) book was shipped today. Will be grinding through that.
I haven't done a HackerRank challenge in a while and I have only done C++ challenges so your ymmv. What I found with HackerRank was that debugging the code I wrote was difficult in the HackerRank environment. My personal process is such that I will use a debugging tool with its various features. In HackerRank I was faced with putting in print statements. Also coding in such a way that compiling errors are minimized from the gitgo was extremely helpful in a the HackerRank timed testing environment. So I will concede that there is a valid argument for being aware and careful in entering code such that compiling errors from the gitgo are kept to a minimum. Also, there is a valid argument for writing code that requires minimal debugging from the gitgo. Minimal meaning like maybe one or two issues at the most. Knowing how to implement a solution without much thinking about it therefore not much debugging needs to take place and coding the solution becomes second nature seems to be what the hiring companies are looking for in using HackerRank for evaluation purposes. Fair enough.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 12:03 PM
Beware of HackerRank

One thing I forgot about was the execution efficiency requirement for passing all the test cases. The comments on the article are interesting too
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 01:26 PM
Lol he probably doesn't know that you can pick and choose the questions you can ask. If you use their platform, you can cherry pick questions from hacker rank's library , or you can design your own with test cases. The guy who wrote this doesn't know ****.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 01:44 PM
Quote:
Originally Posted by Barrin6
Lol he probably doesn't know that you can pick and choose the questions you can ask. If you use their platform, you can cherry pick questions from hacker rank's library , or you can design your own with test cases. The guy who wrote this doesn't know ****.
Yes. Actually I have certainly taken the mindset that wow the test must be bad since I sucked and I don't suck LOL. Really I just assume that companies tailor the HankerRank tests to weed out candidates that don't fit with what they are looking for.

Here's another article that makes some of the points you made:

HackerRank a Good Tool for Evaluating Candidates but Controversial
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 02:08 PM
Well, his article points out a good reason to try Hacker Rank before doing interviews that use it - i.e. to know what the questions are looking for. Like him, the first time I tried it, I assumed they just wanted something that produced the right output. But almost all of them have tests that will fail unless you're using the most efficient O-time algorithm. As they probably should - lots of these problems have easy brute force algorithms that anyone can do, the question is whether you can actually understand how to make an efficient solution.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 03:48 PM
Quote:
Originally Posted by RustyBrooks
Well, his article points out a good reason to try Hacker Rank before doing interviews that use it - i.e. to know what the questions are looking for. Like him, the first time I tried it, I assumed they just wanted something that produced the right output. But almost all of them have tests that will fail unless you're using the most efficient O-time algorithm. As they probably should - lots of these problems have easy brute force algorithms that anyone can do, the question is whether you can actually understand how to make an efficient solution.
Yes the efficiency aspect is something that I think people miss pretty often. There were some complaints in the comments that more or less stated other aspects of development were at least as important. However, if the hiring company puts the highest priority on the most efficient algorithms when implementing their products as opposed to code readability and maintainability then of course it makes sense to test for knowledge on that.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 04:28 PM
i do wish some of the sites that had efficiency as a requirement would do a sort of partial credit where it runs the whole solution & tells you if you got the right answer, but not within the time limit
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-15-2016 , 04:42 PM
Quote:
Originally Posted by Noodle Wazlib
i do wish some of the sites that had efficiency as a requirement would do a sort of partial credit where it runs the whole solution & tells you if you got the right answer, but not within the time limit
I feel like you should know why this probably isn't feasible
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-16-2016 , 01:46 AM
Quote:
Originally Posted by Noodle Wazlib
i do wish some of the sites that had efficiency as a requirement would do a sort of partial credit where it runs the whole solution & tells you if you got the right answer, but not within the time limit
If you done hacker rank often enough they actually do let you know. You can pass 7 out of 8 test cases but you time limit exceed the 8th one.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-16-2016 , 11:02 PM
Here's some questions from a recent test I took. I'll put them in my own words because the instructions asked not to post them on a public internet. They aren't so unusual.

-- Write a program that prints a count of all the words in a text file.

I've only been given this one a million times and can do it in my sleep, but it was unusual because they specified that this should not be a standalone function. I'm not sure if they mean I should create a function called print_word_dictionary_to_be_human_readable or what they mean by creating a full-on program for this. Maybe they wanted this to be in SQLite? I was confused on that one.

-- a function random_nums(M, N).
M - quantity of random numbers to return
N - all generated random numbers must be less than N
each generated number should be unique.

I didn't think this one was too hard, but it's possible my solution wasn't super efficient? I just added a random integer to a set until the len(set) = M.

-- variation on the above, given N as an array, return random numbers from that array.

-- write a function that builds an acyclic graph with a bunch of parameters. They did ask to write one function that builds nodes and another function that adds children to a node. There was a lot of other items to add to this, but rather not write it all out. If you can build the acyclic, the rest was pretty simple.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-18-2016 , 03:37 AM
Interesting problem I worked on today

https://leetcode.com/problems/surrounded-regions/

My approach:
Spoiler:

Used BFS but still get Time limit exceeded on large inputs. Even though the time complexity should still be O(n). From the discussion it seems that doing BFS only on the boundaries would help with the time. Didn't bother improving it since I think my O(n) is already optimal enough.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-18-2016 , 04:39 PM
I think it is like this:

Spoiler:
The hint is binary tree.

start at the second row (where the point of the tree = len(row)

Look at the parent of each O, if it is X, then it is surrounded.

Do not search the entire space. Stop once you are at the last row, since it won't ever be valid (there are O's that will have X parents, but it safe to ignore them)
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-24-2016 , 12:01 AM
Quote:
Originally Posted by daveT
I think it is like this:

Spoiler:
The hint is binary tree.

start at the second row (where the point of the tree = len(row)

Look at the parent of each O, if it is X, then it is surrounded.

Do not search the entire space. Stop once you are at the last row, since it won't ever be valid (there are O's that will have X parents, but it safe to ignore them)
Spoiler:
I don't think binary trees are related to the question at all


Anyways, interview questions where they require you to generate permutations seem to be very common. I always seem to struggle for some reason with them.. :\
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 09:17 AM
One of the Bloomberg interviewers asked me a question about a year ago I've never been able to figure out. Compute the logarithm (base 10) of a number with basic math operators. I can't recall if it was specified whether the inputs or outputs were to be rounded to integers or not.

I told them the best I could do was a solution that worked for exact powers of 10:

Code:
int log10(int input)
{
   int log = 0;
   while (input /= 10)
        log++;

    return log;
}
And that I had no clue about the requisite algorithm of how to compute log10 of, for instance, 5000. And I still don't. I told them, this is not a coding problem, per se; if I knew the algorithm, I'm sure I could write the necessary code.

In retrospect, I could have suggested a linear approximation between the 1000->3 and 10000->4 or something, but I doubt they would have liked that answer anyway, since it seems like it would be pretty terrible, mathematically speaking.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 12:14 PM
Quote:
I told them, this is not a coding problem,
ya, unless I'm missing something this is a terrible question for determining programming prowess.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 01:16 PM
Of course it is a coding problem. You not liking doesn't make it an uninteresting or non-coding problem.

As I see it, the job of a programmer is to solve problems, and yes, this includes many problems that aren't fun, interesting, or inherently familiar (to you).
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 03:05 PM
well, if you have the opportunity to research then fine, but I doubt many ppl know the equation to calculate a logarithm off hand.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 03:46 PM
I guess it's sort of a matter of opinion. Does this help, though?
log(x*y) = log(x) + log(y)

So log10(5000) = log10(1000) + log10(5)
the code above demonstrates how to get log10(1000) (successive divisions by 10) and you're left with how to get log10's for values from 0-9

if y = log10(x) then
10^y = x
You could probably make a quick and dirty binary search type thing to find it - you know that y is going to be between 0 and 1. So let's say we're trying to find log10(5000)

We know this is gonna be 3 + log10(5), so we need to find a number x so that 10^x = 5

Naively we can just split the ranges in 2. Like, we know that
10^0 = 1
10^.5 = 3.16 (too low)
10^1 = 10 (too high)

So it has to be between .5 and 1. Let's try .75
10^.75 = 5.62 - too high so it has to be between .5 and .75. Let's try .625
10^.625 = 4.21 - too low

And so forth. I mean, OK, you have to know this one property about logs to make this work

(Well, actually, you could use your powers of 10 to get that the answer is between 3 and 4 and do a binary search in there also)

Is this what they were looking for? I dunno. Do they really want you to whip out power laws in an interview? Doesn't seem likely, but...

if they did... you were not their candidate.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 04:31 PM
Quote:
Originally Posted by ddubois
One of the Bloomberg interviewers asked me a question about a year ago I've never been able to figure out.
i'm surprised you never google'ed this at any point after the interview. there's a bunch of solutions out there.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 04:45 PM
For me the most uncomfortable interview questions are "you know it or you don't" types of things. You always end up interviewing with like 7 people in the final round, and there's often someone who asks extremely specific questions. Off the top of my head, questions that have tripped me up in the past...

Tell me everything you know about RAID?

What is an inode?

How many Run Levels are there in Linux? Explain each one

Where is X file located on a Linux File system?

What commands would you run to troubleshoot X problem?


The creative problems are much less nerve racking because you're never completely stuck, and I think half of it is them seeing how you think and the other half is them figuring out whether they'd want you on their team. Now that I have started interviewing people, I am more focused on whether they're enthusiastic and quick on their feet, and whether I'd want to work with them every day.

As an aside, every test I've ever taken has had a timer, but no strict time deadline. Always more like "This should take you 3 days" or "This should only take you a night", or when they're in person, "This should take an hour". If I had a strict deadline I'd be terrible.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote
08-25-2016 , 09:54 PM
Quote:
Originally Posted by Go_Blue
i'm surprised you never google'ed this at any point after the interview. there's a bunch of solutions out there.
I did and wasn't able to find out how, although maybe my Google Fu was deficient.
Interview  Test Questions Problems, Solutions, Links, Discussion Quote

      
m