Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > >

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 08-14-2016, 03:13 PM   #26
bex989
centurion
 
bex989's Avatar
 
Join Date: Nov 2013
Posts: 148
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
bex989 is offline   Reply With Quote
Old 08-14-2016, 11:33 PM   #27
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,657
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by adios View Post
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.
Barrin6 is offline   Reply With Quote
Old 08-14-2016, 11:37 PM   #28
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,657
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
Barrin6 is offline   Reply With Quote
Old 08-15-2016, 01:45 AM   #29
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,912
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by bex989 View Post
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.
daveT is offline   Reply With Quote
Old 08-15-2016, 07:07 AM   #30
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,921
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by Barrin6 View Post
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.
adios is offline   Reply With Quote
Old 08-15-2016, 12:03 PM   #31
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,921
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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
adios is offline   Reply With Quote
Old 08-15-2016, 01:26 PM   #32
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,657
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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 ****.
Barrin6 is offline   Reply With Quote
Old 08-15-2016, 01:44 PM   #33
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,921
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by Barrin6 View Post
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
adios is offline   Reply With Quote
Old 08-15-2016, 02:08 PM   #34
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,258
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
RustyBrooks is online now   Reply With Quote
Old 08-15-2016, 03:48 PM   #35
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,921
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by RustyBrooks View Post
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.
adios is offline   Reply With Quote
Old 08-15-2016, 04:28 PM   #36
Loki
Formerly Noodle Wazlib
 
Loki's Avatar
 
Join Date: Nov 2015
Location: Participating in buffoonery
Posts: 11,521
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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
Loki is offline   Reply With Quote
Old 08-15-2016, 04:42 PM   #37
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,258
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by Noodle Wazlib View Post
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
RustyBrooks is online now   Reply With Quote
Old 08-16-2016, 01:46 AM   #38
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,657
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by Noodle Wazlib View Post
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.
Barrin6 is offline   Reply With Quote
Old 08-16-2016, 11:02 PM   #39
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,912
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
daveT is offline   Reply With Quote
Old 08-18-2016, 03:37 AM   #40
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,657
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Interesting problem I worked on today

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

My approach:
Spoiler:
Barrin6 is offline   Reply With Quote
Old 08-18-2016, 04:39 PM   #41
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,912
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I think it is like this:

Spoiler:
daveT is offline   Reply With Quote
Old 08-24-2016, 12:01 AM   #42
Barrin6
Carpal \'Tunnel
 
Barrin6's Avatar
 
Join Date: Dec 2005
Location: beyond legal blindness
Posts: 6,657
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by daveT View Post
I think it is like this:

Spoiler:
Spoiler:


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.. :\
Barrin6 is offline   Reply With Quote
Old 08-25-2016, 09:17 AM   #43
ddubois
Carpal \'Tunnel
 
ddubois's Avatar
 
Join Date: Jan 2004
Location: Coconut Creek, FL
Posts: 7,677
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
ddubois is offline   Reply With Quote
Old 08-25-2016, 12:14 PM   #44
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 58,070
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
Victor is offline   Reply With Quote
Old 08-25-2016, 01:16 PM   #45
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,912
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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).
daveT is offline   Reply With Quote
Old 08-25-2016, 03:05 PM   #46
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 58,070
Re: Interview Test Questions Problems, Solutions, Links, Discussion

well, if you have the opportunity to research then fine, but I doubt many ppl know the equation to calculate a logarithm off hand.
Victor is offline   Reply With Quote
Old 08-25-2016, 03:46 PM   #47
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,258
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
RustyBrooks is online now   Reply With Quote
Old 08-25-2016, 04:31 PM   #48
Go_Blue
centurion
 
Join Date: Jun 2012
Location: Chicago
Posts: 182
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by ddubois View Post
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.
Go_Blue is offline   Reply With Quote
Old 08-25-2016, 04:45 PM   #49
Go_Blue
centurion
 
Join Date: Jun 2012
Location: Chicago
Posts: 182
Re: Interview Test Questions Problems, Solutions, Links, Discussion

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.
Go_Blue is offline   Reply With Quote
Old 08-25-2016, 09:54 PM   #50
ddubois
Carpal \'Tunnel
 
ddubois's Avatar
 
Join Date: Jan 2004
Location: Coconut Creek, FL
Posts: 7,677
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by Go_Blue View Post
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.
ddubois is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 11:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online