r/compsci • • May 17 '19

20+ String Coding Interview Questions for Programmers

https://hackernoon.com/20-string-coding-interview-questions-for-programmers-6b6735b6d31c
113 Upvotes

41 comments sorted by

104

u/[deleted] May 17 '19

If interviews ask you bullshit string questions like this don’t work there. Stop propagating a culture of rote learning and minutiae worship. This is why our industry sucks and most code in the wild is abysmal.

37

u/floridawhiteguy May 17 '19

Amen.

Programmer team leads and managers would be better served looking for folks who share specific industry knowledge and experience rather than the ability to quickly rattle off answers to brain-dump quizzes. That may mean looking at older and more expensive candidates, but the payoff in productivity is worth it.

For example, the oft-cited "experienced nurses can be better programmers for healthcare software than Comp-Sci majors" - because nurses have the background to appreciate and deal with the necessary complexities involved.

I did a three month internship during college at a hospital IT department, and I learned more about databases in a week from a nurse-turned-MUMPS programmer than I'd absorbed in the prior two semesters.

7

u/TheFeshy May 17 '19

This, at least 95%.

Some of these, I guess, would be okay if they are asking for one-sentence descriptions of how you would do it, to show that you understand the structure and common programming techniques ("I'd count letters by using a bucket sort" or "I'd check for anagrams by sorting the characters within the string.") And of course if you're not expected to know the best way off the top of your head, or write it all out on a white board or submit all 20 solutions in code to their automated server.

There's still better interview questions to ask, especially for anything other than an entry-level position (entry level is a bit more constrained because you can't ask them about past problems they have solved and that sort of thing.)

1

u/Kinglink May 18 '19

The problem is these prove "I can code" anyone can tell me what they did on their past problems. I mean I could tell you about any time I wrote code, but it's just as easy to lie or embellish and as much as people want to believe "I can spot a lie" I'm sure a skilled liar would fool them. You're a programmer not a lie detector.

Even if I did write the code, I don't tell you how much time I needed to write it. If I'm fluent or confident in my language of choice, or I even know how to write a for loops.

Just look up fizzbuzz questions and laugh at them, then go read testimonals of interviewers whose candidates CAN'T write out a program to print 1-100... I mean we can say "These are bad questions" all day long but the candidate who can't answer them probably isn't a good candidate.

If you can't answer these questions.... it's a really bad sign. They aren't tricks or traps necessarily, they aren't trying to go "haha the correct algorithm is." They want to see your approach (Do you ask question) and want to see if you tackle the problem well or notice edge cases brought up. I would expect most candidate to answer any of these questions with out much thought, even if it is not the optimal solution, studios should be having you prove you can program even at a basic level.

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so.

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so.

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so.

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so.

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so.

0

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so.

0

u/[deleted] May 17 '19

[deleted]

8

u/Nikolas_Untoten May 18 '19

It's not hard to get payed well as a programmer, and at one point you'll realize you can't use whatever extra money you made to buy the time you spent back

0

u/[deleted] May 18 '19

No but it makes the rest of the time sheet the vest much better

1

u/[deleted] May 18 '19

I worked at amazon and hated it. They pay piss poor for the area and the culture there sucked. also everyone kinda hates them here. ¯_(ツ)_/¯

If you like being taken advantage of then by all means, don’t let me stop you. But there’s no reason to work 60 hour weeks for less than market price

1

u/[deleted] May 18 '19

I worked at amazon and hated it. They pay piss poor for the area and the culture there sucked. also everyone kinda hates them here. ¯_(ツ)_/¯

If you like being taken advantage of then by all means, don’t let me stop you. But there’s no reason to work 60 hour weeks for less than market price.

1

u/[deleted] May 18 '19

I worked at amazon and hated it. They pay piss poor for the area and the culture there sucked. also everyone kinda hates them here. ¯_(ツ)_/¯

If you like being taken advantage of then by all means, don’t let me stop you. But there’s no reason to work 60 hour weeks for less than market price.

1

u/[deleted] May 18 '19

I worked at amazon and hated it. They pay piss poor for the area and the culture there sucked. also everyone kinda hates them here. ¯_(ツ)_/¯

If you like being taken advantage of then by all means, don’t let me stop you. But there’s no reason to work 60 hour weeks for less than market price.

0

u/[deleted] May 17 '19

[deleted]

-9

u/[deleted] May 18 '19

I went from entrepreneur to employee 2 years ago. Fucking cake walk.

0

u/[deleted] May 18 '19

[deleted]

-8

u/[deleted] May 18 '19

Investments blew up in my face I had to. I have side hustles I hope will take off so I can go back. Corporate life is crazy. Ego is more important than objective.

1

u/[deleted] May 18 '19

Thats nice dear

0

u/[deleted] May 18 '19

Wow look at all these whiners. Lol

0

u/[deleted] May 18 '19

Where do you see them, buddy?

0

u/[deleted] May 18 '19

Downvotes

→ More replies (0)

26

u/Nerdlinger May 17 '19

A good thing about the string data structure is that if you know the array data structure, you can easily solve string-based problems because strings are nothing but a character array.

Enh. This is really language dependent. For example, it is not true in Swift, and as a result, some of your answers (like for string reversal) are poor answers.

0

u/[deleted] May 17 '19

[deleted]

7

u/Nerdlinger May 17 '19 edited May 17 '19

No, I’m talking about the fact that they aren't Arrays. They are both Collections, but Strings are not Arrays. Their relationship is more like humans and orangutans than humans and apes.

This does bring in to play things like non-constant time random access, but it also brings into play the various features of the protocols that Strings conform to that make solutions like index/position swapping for reversal a poor choice for the bulk of use cases.

0

u/[deleted] May 17 '19

[deleted]

1

u/icendoan May 17 '19

I think that there will be strings that force you to copy.

19

u/icendoan May 17 '19

strings are an array of characters

Not in utf8, they're not. Ascii is not the be all and end all.

5

u/quentech May 17 '19

What runtimes store strings in memory as utf8?

3

u/nikeinikei May 17 '19

I think Rust, but I may be wrong

1

u/masklinn May 18 '19

You’re correct, a rust string is stored as utf8. In fact, non-utf8 str is a specific example of the « Invalid values in primitive types » UB.

3

u/czdl May 17 '19 edited May 17 '19

Cocoa / OSX

Windows uses UTF16 which has exactly the same issue.

1

u/Nerdlinger May 17 '19

I believe Objective C/NSString still uses UTF-16 for the backing store, though Swift recently switched to UTF-8.

1

u/czdl May 18 '19

Perhaps on iOS, but querying NSString for its representation, or pulling bytes out on OSX reveals UTF-8.

0

u/quentech May 17 '19

has exactly the same issue

Windows uses fixed 16-bit width characters and string are in fact arrays of them.

1

u/nzodd May 18 '19

What do you mean, the win32 api? So how does it store characters outside the BMP then ?

1

u/masklinn May 18 '19

Same as java or JavaScript, surrogates are visible and you can easily get or create outright invalid text, even ignoring the grapheme cluster issue.

0

u/czdl May 18 '19

They’re arrays of them in the same sense that utf8 is an array of characters. If you don’t handle surrogates, you break the string.

1

u/[deleted] May 17 '19

Strings are unicode in many languages but probably aren't encoded with utf-8 all the time.

1

u/Keegbear May 17 '19

interesting, how does utf8 work in this manner?

1

u/masklinn May 18 '19

The normal way? The backing buffer is an array of code units (bytes), and string-level APIs either decode to codepoints or grapheme clusters on the fly (for iteration or classification) or operate directly on the backing buffers (no need to decode to concatenate two strings, you can just concatenate the bytes).

It does mean you don't get straightforward O(1) indexing for instance. Though that's mostly a good thing as unicode complexities means O(1) access to codepoints (or code units) is mostly useful to fuck up.

15

u/chrism239 May 17 '19

I'm wondering how many programmers, working on a 'real' project, have ever needed to reverse the characters in a string, or the words in a sentence, or needed to check for palindromes? Just wondering.

6

u/Scottishboy614 May 17 '19

I have! In order to use a positive lookahead regex, which was (maybe still is?) Unsupported on Firefox, I had to reverse a string and make backwards regex back & forth to take advantage of positive look behind. It was as messy as it sounds

6

u/pythonaut May 17 '19

That sounds awful, but hilarious.

4

u/icendoan May 17 '19

Sure. It's not a bad question because you're not expected to do exactly that; the idea is that you can apply algorithmic thinking to a problem. If it's an interview, you want to do it quickly, and not spend hours hashing out all the real world edge cases.

12

u/[deleted] May 17 '19

[removed] — view removed comment

1

u/[deleted] May 18 '19

My current company asked me to implement a binary parser from a set of requirements in the comfort of my own home. That's really when I knew I wanted to work there.

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

1

u/Kinglink May 18 '19

Please walk out of these interviews.

If a company wants to pay me exceedingly well and I have to hop through a few memorization tricks great. Even better if I get the answer through my simple understanding of Data structures, algorithms, and being able to demonstrate an ability to code.

Every time someone posts one of these things there's a guy who goes "Well these questions are stupid and pointless." Which instantly tells me two things. A. I don't want to work with that person. B. That person is an interviewee, never an interviewer.

Bad candidates get through pre-screening. They can cheat, just not be asked the right question or somehow fool the HR department.

But questions like this actually test more than "rote learning and minutiae" and if you answer them and pay attenton to what's ask you're probably start noticing it.

A candidate needs to prove he can code, not just in a controlled enviroment, or even at home, but in front of someone else. Again cheating is a big thing, and when you're offering a good salary for a job, there's incentive to cheat, even for a short term job. Every interviewer has had an interview where the candidate didn't know how to code.

But beyond that, every question here is fucking easy. I don't mean "Well I know the answer." I mean "if you can't answer this, you're probably not a good programmer", which is why study guides like this is eye rolling.

There are definitely better answers, and worse answers, but if you need "Rote memorization" for these questions.. that's a really bad sign, and a great reason not to hire the person.

Beyond that though, I've worked with enough asshole who will say something like "That's beneath me" or "you don't have to do it that way" and you know what I really don't want another. If questions like this get those people to walk out or show their cards in the interview process, I'm glad I ask them and will keep on doing so. .

3

u/pythonaut May 17 '19 edited May 17 '19

Honestly, I would rather a new developer learn about regex and character encoding than master these string riddles. "Oh, but I need an algorithm to determine whether this string is an anagram of this other string!" said no one.