19

For my job interview, they asked me to write simple Java code to check if the string is palindrome or not! Like sir, I've prepared for advanced quick sort and all algorithms and you ask me this!! 🥺

Comments
  • 4
    I understand. You must have prepared for a lot of these algorithm and data structures questions for the technical interview and they hit you with something simple like this and you feel like all this prep was for nothing. I don’t agree with these interview styles but in this situation where you get disappointed I suggest you give the interviewer the D. Gently but firmly.
  • 3
    What a pointless question. Seriously, it's been 30 years since I had to write any kind of sort routine.
  • 2
    Hahahaha happened to me as well... But eventually the advance shit got me into a much better company, one of the best in India that I'd be joining very soon🤩
  • 0
    @BugsBuggy may I ask which one? Also what kind of advanced shit?

    By the way, congrats on the new gig and good luck
  • 2
    Thanks...
    I haven't received the offer letter yet but the HR at Flipkart has already told me about my selection.
  • 7
    if (string === "palindrome"){
    alert("snigger");
    }
  • 1
    @hatemyjob advance shit like Graph, Trees and difficult probelms on them... I gave an interview at MakeMyTrip and the interview was so easy... They asked me binary search, spiral traversal of a matrix and palindromic linked list.
  • 0
    @BugsBuggy wow. Good on you. I’ve heard good things about that place. Have fun.
  • 1
    @BugsBuggy That’s some fairly advanced stuff I’ll mess up royally.
  • 1
    @hatemyjob my advanced stuff I meant problem solving questions on Data Structures and Algorithms, like Dynamic Programming questions (Longest Increasing subsequence, trapping rainwater), Greedy Algorithm, DFS and BFS, and being handy on Data Structures like Trees, Graphs etc...

    Two of the toughest questions I had to solve during any interviews were where one required implementation of heap and one required BFS on a tree, but again you can't really traverse a parent from a child hence it required a mix of recursion into BFS.

    Then given teensy experience of one and a half years, a Machine Coding round where my experience came in very handy, the code was judged on my usage of OOP, modularity, clarity and extensibility of my code. Also, since I was coming from a startup, the work I did there probably seemed impressive to the manager in managerial round.
  • 1
    Also, further more advanced Algorithms like Djisktra, Bellman Ford for Graph traversal, self balancing trees like AVL, Red Black tree etc aren't generally asked but some companies shortlist candidates through coding challenges, and very rarely someone asks a question which could be solved using these.

    On the other hand, brute force traverse or back tracking comes in very handy.
  • 0
    @BugsBuggy This is wonderful information. Thank you for writing it all out my man!
  • 1
    You mean if (s.reverse().equals(s)) line of code ?

    Throw in "trim" and "toLowerCase", just in case
  • 0
    @NoToJavaScript interview ends right there, interviewer showing the door out!
Add Comment