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 10-01-2016, 01:26 PM   #176
Prickly Pear
enthusiast
 
Prickly Pear's Avatar
 
Join Date: Aug 2016
Posts: 60
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I'm starting to think hackerrank is garbage. All the questions and answers seem to have been written by non english speakers. The "editorial" section which explains the solution is only available after you have found the solution and they're hardly coherent and often not the best answer.

For example the solution to the bribe problem posted by the guy who wrote it was to use some weird bubble sort,

Spoiler:


exercism.io seems far superior but the problems aren't hard enough (though maybe more realistic for most job interviews that aren't for google/amazon etc).

Anyone use something other than hackerrank? Ideally like exercism where you can view everyones solutions so you don't have to google the problem and read some indian's programming blog to check if your approach was the best.
Prickly Pear is offline   Reply With Quote
Old 10-01-2016, 01:49 PM   #177
gaming_mouse
Carpal \'Tunnel
 
gaming_mouse's Avatar
 
Join Date: Oct 2004
Location: taking notes on u (see profile)
Posts: 13,767
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I've probably done like 10 or so of the medium/hard ones on http://www.codewars.com/ and thought they were pretty good.

I think project euler problems can be counted on to have the most vetting and have so many solutions that you will always see excellent ones that are shorter than yours.

There are so many of these sites nowadays though... I haven't tried anywhere close to all of them.
gaming_mouse is offline   Reply With Quote
Old 10-01-2016, 02:03 PM   #178
Victor
Carpal \'Tunnel
 
Victor's Avatar
 
Join Date: Jul 2003
Posts: 58,097
Re: Interview Test Questions Problems, Solutions, Links, Discussion

+1 to gaming mouse on codewars and projecteuler. ive done 27 eulers fwiw.

interviewcake is pretty good but boy do they love linked lists.
Victor is offline   Reply With Quote
Old 10-01-2016, 02:20 PM   #179
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,266
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I am getting this a lot on codewars:

Code:
The server attempted to execute your code but there was an issue with the request. This should be a rare issue. Please try running your code again. If the issue persists, please contact us
RustyBrooks is offline   Reply With Quote
Old 10-01-2016, 02:22 PM   #180
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,266
Re: Interview Test Questions Problems, Solutions, Links, Discussion

In fact it seems to do this every time I try to submit my code.
RustyBrooks is offline   Reply With Quote
Old 10-01-2016, 02:43 PM   #181
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 83,733
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by gaming_mouse View Post
I've probably done like 10 or so of the medium/hard ones on http://www.codewars.com/ and thought they were pretty good.

I think project euler problems can be counted on to have the most vetting and have so many solutions that you will always see excellent ones that are shorter than yours.

There are so many of these sites nowadays though... I haven't tried anywhere close to all of them.
I used to work with Jake Hoffner, one of the founders. Very smart guy. Glad to see people using it!
suzzer99 is offline   Reply With Quote
Old 10-01-2016, 02:46 PM   #182
suzzer99
Carpal \'Tunnel
 
suzzer99's Avatar
 
Join Date: Nov 2005
Location: on top of the bell curve
Posts: 83,733
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by RustyBrooks View Post
I am getting this a lot on codewars:

Code:
The server attempted to execute your code but there was an issue with the request. This should be a rare issue. Please try running your code again. If the issue persists, please contact us
Quote:
Originally Posted by RustyBrooks View Post
In fact it seems to do this every time I try to submit my code.
I sent this to Jake on FB.
suzzer99 is offline   Reply With Quote
Old 10-01-2016, 05:51 PM   #183
OmgGlutten!
veteran
 
Join Date: Aug 2016
Posts: 2,407
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I go to hackerrank and i am totally lost, have no starting point. where do you go to actually learn how to do that stuff? like, i just want the text book that shows this is the question, this is the answer, this is how it is solved. this is what this does.

I am learning ruby-on-rails/css/html5/jquery right now.
OmgGlutten! is offline   Reply With Quote
Old 10-01-2016, 08:15 PM   #184
Prickly Pear
enthusiast
 
Prickly Pear's Avatar
 
Join Date: Aug 2016
Posts: 60
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by OmgGlutten! View Post
I am learning ruby-on-rails/css/html5/jquery right now.
go to exercism.io and download the ruby problems. They come with unit tests that sort of guide you to the solution. You can also submit non working solutions and then look over everyone else's answers to learn what works.

hackerrank is a site for elite indian programmers competing over h1b visa positions at amazon. I wouln't bother with it until you're learning algorithms and data structures.
Prickly Pear is offline   Reply With Quote
Old 10-02-2016, 03:07 AM   #185
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

Hmm never tried codewars. I have been doing codefights for a bit when I'm bored of leetcode. The codefights is still has a lot of bugs but I think it has great potential.

You can do quick match fights against similar ranked people and you race to solve coding problems. I recommend giving it a try especially if you are trying to break the monotony.
Barrin6 is offline   Reply With Quote
Old 10-11-2016, 03:02 AM   #186
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

Got an invite for a hackerrank test from a high frequency trading firm. One of the questions was disguised as a subset-sum problem:

Given an array of numbers.. find the minimal number of elements such that the sum of those elements is between L and H, where L<= H.

So for example
[4,1,3,5] L = 7 H = 10 return 2
Barrin6 is offline   Reply With Quote
Old 11-26-2016, 03:00 PM   #187
Prickly Pear
enthusiast
 
Prickly Pear's Avatar
 
Join Date: Aug 2016
Posts: 60
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I came across an interesting problem. You are given a string of digits, '1145'. You need to find the number of possible string representations of this number given the following rules.

1 -> a
2 -> b
3 -> c
....
11 -> k
...
26 -> z

so for the input, '1145' you can map the first 1 to 'a' or you can take '11' as a single number that maps to 'k'.

ie

1145 -> aade, kde, ane

so the output would be 3
Prickly Pear is offline   Reply With Quote
Old 11-27-2016, 05:24 AM   #188
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

I think I did I have done that problem before. It's a DP problem and someone I know was asked this by facebook
Barrin6 is offline   Reply With Quote
Old 11-27-2016, 05:59 AM   #189
Bantam222
veteran
 
Bantam222's Avatar
 
Join Date: Aug 2006
Location: Seattle
Posts: 2,364
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Haven't had time to read this thread yet but I will add:
Buying the book cracking the coding interview had been by far the best ROI investment I have ever made in my life (both money invested and time invested)

Source: I am a dev at Microsoft
Bantam222 is offline   Reply With Quote
Old 11-27-2016, 07:44 AM   #190
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,922
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by Bantam222 View Post
Haven't had time to read this thread yet but I will add:
Buying the book cracking the coding interview had been by far the best ROI investment I have ever made in my life (both money invested and time invested)

Source: I am a dev at Microsoft
Yes and practice putting the solutions on a white board.
adios is offline   Reply With Quote
Old 12-01-2016, 04:19 PM   #191
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,948
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Had an interesting question that stumped be pretty hard.

"What is one thing you think a Python developer should know."

You can replace Python with whatever other language you want.

It stumped me because I thought it was a little over judgmental. I've met all sort of programmers who don't know about some idea X that I'd figure they ought to know about, and that's okay, I suppose.

I said write function, but I guess writing properly semantic, non C-like code would have been a better minimum bar.
daveT is offline   Reply With Quote
Old 12-01-2016, 09:40 PM   #192
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,266
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I can't decide if I hate that question or not. I have a lot of trouble with the "one thing" part, it's kind of like "what's your favorite movie" which I can't not even come close to answering. I've seen thousands of movies and I love hundreds. I doubt I could even make a top 10 without changing my mind 20 times and still wouldn't be satisfied with it.

Maybe an interesting counter question would be "what is a feature of python that developers should NOT use"
RustyBrooks is offline   Reply With Quote
Old 12-02-2016, 12:14 PM   #193
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,922
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by daveT View Post
Had an interesting question that stumped be pretty hard.

"What is one thing you think a Python developer should know."

You can replace Python with whatever other language you want.

It stumped me because I thought it was a little over judgmental. I've met all sort of programmers who don't know about some idea X that I'd figure they ought to know about, and that's okay, I suppose.

I said write function, but I guess writing properly semantic, non C-like code would have been a better minimum bar.
Not a good question. First of all the lowest common denominator for anyone who refers to themselves as a Python developer is different than the lowest common denominator for a senior type developer. Second of all there is more than one thing. The question implies to me some sort of hierarchy stemming from one basic thing. It is a poor way to view competency in a language.
adios is offline   Reply With Quote
Old 12-02-2016, 05:15 PM   #194
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,948
Re: Interview Test Questions Problems, Solutions, Links, Discussion

That's what I was thinking about as well. The way a person used Python as a Django developer, a scientist, or a DevOps is going to be very different. I wouldn't expect a Django developer to be a master of I/O and Pandas, but I'd expect other kinds of programmers to be fluent in these things. I almost said run a python script from the command line, but then I figured there would be people who could reasonably program Python using some IDE who would never know how to do that either.

I was also asked a similar question on SQL. I said you should know data integrity, since that is the precise reason for SQL to exist. All other knowledge is pretty worthless without that under control.

I don't think they liked either of my answers.
daveT is offline   Reply With Quote
Old 12-02-2016, 06:56 PM   #195
adios
Carpal \'Tunnel
 
Join Date: Sep 2002
Location: Russian Troll
Posts: 20,922
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by daveT View Post
That's what I was thinking about as well. The way a person used Python as a Django developer, a scientist, or a DevOps is going to be very different. I wouldn't expect a Django developer to be a master of I/O and Pandas, but I'd expect other kinds of programmers to be fluent in these things. I almost said run a python script from the command line, but then I figured there would be people who could reasonably program Python using some IDE who would never know how to do that either.

I was also asked a similar question on SQL. I said you should know data integrity, since that is the precise reason for SQL to exist. All other knowledge is pretty worthless without that under control.

I don't think they liked either of my answers.
I think this is a good post.
adios is offline   Reply With Quote
Old 12-02-2016, 08:32 PM   #196
Sholar
Carpal \'Tunnel
 
Sholar's Avatar
 
Join Date: Jul 2007
Posts: 6,341
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Yeah, I think the best answer is basically what you put in that post.

In either case, it's probably best to first state what you're actually answering. E.g. to start with "well, an interesting language feature that people don't typically get exposed to when first learning it is generator functions". At least that way the interviewer knows how you interpreted that rather vague prompt.
Sholar is offline   Reply With Quote
Old 12-02-2016, 08:42 PM   #197
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,266
Re: Interview Test Questions Problems, Solutions, Links, Discussion

I have to say I "learned" about generators early into python but I think it was a year minimum before I really understood them and then a year later I was still figuring out things I hadn't really understood about them. I'm not 100% confident I know everything about them.
RustyBrooks is offline   Reply With Quote
Old 12-03-2016, 06:43 PM   #198
daveT
S.A.G.E. Master
 
daveT's Avatar
 
Join Date: Jun 2005
Location: Why didn't I use Clojure instead?
Posts: 21,948
Re: Interview Test Questions Problems, Solutions, Links, Discussion

For sure. Anything form the Standard Lib is a good candidate as well. I could argue all day that I'd never want to work next to developer who doesn't know what hmac is, but I know that is a futile exercise, and I could reasonably talk to people who don't know what it is, and don't even need to know what it is.

Generators is an interesting topic though. I've taken some tests where the requirement is use all generators. I can do them, but at some point, it feels over zealous, especially when those one-liners become 150 characters long.

And also, as we once both found out, there is a difference between 2 and 3 with generators. I don't know v2 flavors at all.
daveT is offline   Reply With Quote
Old 12-03-2016, 06:50 PM   #199
RustyBrooks
Carpal \'Tunnel
 
RustyBrooks's Avatar
 
Join Date: Feb 2006
Location: Austin, TX
Posts: 23,266
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Quote:
Originally Posted by daveT View Post
And also, as we once both found out, there is a difference between 2 and 3 with generators. I don't know v2 flavors at all.
And I don't know the 3 flavors at all either.

I actually think python slightly screwed up with generators, but I'm not sure. I've finally decided that when writing utility libraries, returning a generator could be considered hostile unless there's a really good reason for it, or the caller has a *really* clear way to know that's what they'll get.
RustyBrooks is offline   Reply With Quote
Old 02-08-2017, 03:41 PM   #200
PJo336
THRILLHOUSE!
 
PJo336's Avatar
 
Join Date: Mar 2007
Posts: 21,350
Re: Interview Test Questions Problems, Solutions, Links, Discussion

Maybe this doesnt apply to the actual use of this thread, but I have done a project for a company and we are going to do an hour long review of it. Obviously Im sure there will be lots of "I did it this way because I was thinking about X" and "Why did you not do this Y?" but any pointers on preparation or perhaps "gotchas" anyone can think of? Any angles to kind of review before hand?
PJo336 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 08:55 AM.


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