Why the hell IT Interviewers In India Ask 'Sorting Algorithms'?

It's almost a trend since the last decade. In any software / IT job interview, a fresh candidate would definitely be asked to write some 'sorting algorithm'. It's so regular that it now looks stupid.

Is there any specific reason for this? 😨

Replies

  • graphite
    graphite
    Can't tell about the specific reason behind it but yes has faced questions based on sorting algorithms in my interviews and most often they ask bubble and quick sort algorithms.😀
  • Abhijit Dey
    Abhijit Dey
    They try to check whether the students know the basics in algorithms and problem solving techniques. Had a word with a HR once, he said that students don't even know the logic behind a simple bubble sort.
  • Pensu
    Pensu
    Stupid? That's a little harsh! Well, they are one of the basic algorithms in computer science. There is a lot of data everywhere and a randomly distributed data is of no use. You gotta use the data, you need to sort it first and you need to know sorting algorithms for that!
  • Kaustubh Katdare
    Kaustubh Katdare
    Pensu
    Stupid? That's a little harsh!
    What students do is just mug up the algorithm and reproduce it.

    It's true that several engineers don't even know the basics they ought to know. I had asked one candidate how the direct current flows through capacitor and he was 'confused'. His academic performance, if that matter, was 'good'.
  • avii
    avii
    Kaustubh Katdare
    What students do is just mug up the algorithm and reproduce it.
    One can easily spot if student has mugged up algorithms very easily. Most importantly, it is difficult explain analysis of an algorithm if he mugs up the algorithm.
  • Anoop Kumar
    Anoop Kumar
    Asking algorithm are just checking logic capability.
    If interviewer will just ask x-sorting algo and move to on, I would say interviewer is dump. He should ask inside of algo and using in real world problems.
    I believe, muggers can memorize algo but not the inside.
  • Prasad Ajinkya
    Prasad Ajinkya
    I have been recruiting programmers for the past 6 years now, and I almost always ask a twisted sorting algo up front.

    Here is my reasoning to do so -
    • Any person can write code and syntax ... with a bit of Googling, anyone can do that. I want someone who can logically analyse a problem and solve it.
    • I don't check the syntax, I just ask the person to write the algo in plain english or the pseudo code
    Of the 500+ people that I must have interviewed by now, I doubt whether 5% have been able to solve this sorting problem. That's sad, but that's why I use this problem ... to identify between people who mug up code and people who use logic.
  • avii
    avii
    Totally agreed. I have found BE/BTech graduates with kickass marks & all, hard to analyse even simplest comparison sorting algorithms like Selection Sort or Insertion Sort
  • Anand Tamariya
    Anand Tamariya
    A short story:

    Till the third phase there was minimal interpersonal interaction with the interviewers. We were just a number to them.

    A couple of friends of mine had made it to the technical interview too. We were sitting outside the room where interviews were going on, waiting for our turn.

    We asked the first few guys went through the interview about what they were asking about. Each said they asked them write down one sorting algorithm or another, among other things. This wasn't a surprise as sorting algorithms are the most common interview questions out here in India.

    So everyone took out their books and started going through the algorithms again. Just to make sure they knew them by heart.

    I was lucky to have taken an elective of Computer Science back in high school (CBSE board), and my school (DPS Bhilai) had one of the best faculty around for teaching Computer Science. So I'd know these sorting algorithms for over four years and didn't had to memorize them to write them down. My first computer science teacher taught it as the first rule - Don't try to memorize code. That's not how programming is supposed to be done.

    Then came my turn for the technical interview. After casual introductions. He asked, "Are you nervous?"

    Me: A little bit.

    He: Did you talk to the guys who have already given the interview?

    Me: Yes, we did.

    He: What did they say?

    Me: To focus on sorting algorithms.

    He: So have you?

    Me: Didn't need to. But I brushed up on them, a little.

    He: So you're fully prepared?

    Me: If you're going to ask about Sorting algorithms, yes.

    He: Sorting algorithms make up for good interview questions. And every university in India has that in their curriculum, so it helps us standardise the interview process.

    Me: But if everyone expects to be asked about them, it kind of beats the purpose, right?

    He: You'd be surprised how few of the candidates actually understand them.

    Me: So at best you hope to find a person who knows that particular answer well, that he knew he was going to be asked for.

    He: You think the current process doesn't work?

    Me: I think it can be made to work better.

    He: That sounds like a polite way to say we don't know what we're doing.

    Me: I'm sorry. I didn't mean it that way.

    He sat silent for a few seconds, then said. What should we rather be asking.

    Me: Anything that a candidate is supposed to know, but still has to apply his mind solving.

    #-Link-Snipped-#

You are reading an archived discussion.

Related Posts

Professor Walter Lewin. Professor Emeritus at MIT 'lives' physics in his classroom. Check out how he teaches Physics -
Aherk lets you blackmail yourself till a deadline that you set for yourself. The concept is pretty interesting and I think it does work. Here's how it operates - 1....
Delhi, Jammu and part of North India again felt tremors at 12: 30 pm. Hopefully not much damage. Though these tremors were not very strong, as epicenter was not in...
A Boy and His Atom has entered the book of Guinness World Records for being the world's 'smallest movie', made with atoms. The movie features thousands of atoms that 'act'...
Germans take the roads seriously - and have developed a new high-speed laser scanning technology to survey the roads for evenness & overall quality. Research engineers at Fraunhofer Institute For...