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

View all comments

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.

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.