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

    Kaustubh Katdare

    Administrator

    Updated: Oct 26, 2024
    Views: 1.5K
    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? 😨
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • graphite

    MemberMay 1, 2013

    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.😀
    Are you sure? This action cannot be undone.
    Cancel
  • Abhijit Dey

    MemberMay 1, 2013

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Pensu

    MemberMay 1, 2013

    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!
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorMay 1, 2013

    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'.
    Are you sure? This action cannot be undone.
    Cancel
  • avii

    MemberMay 1, 2013

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Anoop Kumar

    MemberMay 1, 2013

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Prasad Ajinkya

    MemberMay 1, 2013

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • avii

    MemberMay 1, 2013

    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
    Are you sure? This action cannot be undone.
    Cancel
  • Anand Tamariya

    MemberMay 1, 2013

    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: <I didn't know who was watching us, and who wasn't when we were talking to the other folks, so for once in life, honesty did seem the best policy> 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: <Gave a shy smile> If you're going to ask about Sorting algorithms, yes.

    He: <Gave a slight chuckle> 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-#
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register