Thoughts from a Google interviewer


  • 60
    H

    One of the quotes is

    For God's sake, don't try sorting a linked list during the interview

    http://steve-yegge.blogspot.nl/2008/03/get-that-job-at-google.html

    So it might be better to actually copy the values into an array and sort them there.


  • 0
    M

    that's definitely true


  • 0
    C

    While merge sort for linked lists seems not so tricky~


  • 4
    C

    For God's sake, don't try sorting a linked list during the interview
    Definitely true。


  • 4
    T

    I don't get this comment though. What if you were asked to specifically sort a linked list? Or does that mean doing the sort linked list problems on leetcode is pointless?


  • 19

    You could for sure talk about it in the interview and clear it out before jumping into sorting a list. But in the end, you end up doing what he wants you to do(Say he doesn't want you to use Extra Space).

    Also, For example, you could talk about the following comparison of copying a list to array vs sorting the list : http://stackoverflow.com/questions/1525117/whats-the-fastest-algorithm-for-sorting-a-linked-list.

    In my opinion, it's better to just put all the pros/cons on the table, and ask him which one he actually needs.


  • 0
    S

    You should know at least one programming language really well, and it should preferably be C++ or Java. C# is OK too, since it's pretty similar to Java. You will be expected to write some code in at least some of your interviews. You will be expected to know a fair amount of detail about your favorite programming language.

    Is this still true? C++ / Java is must?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.