What are your worst interviews you’ve done? I’m currently going through them myself and want to hear what others are like. Dijkstras algorithm on the whiteboard? Binary Search? My personal favorite “I don’t see anything wrong with your architecture, but I’m not a fan of X language/framework so I have to call that out”
Let me hear them!
(Non programmers too please jump in with your horrid interviews, I’m just very fed up with tech screens)
To kick us off, mine from this week that I wrote down in another thread. In 60 minutes take an adjacency matrix as an input, good old
int[][]
, and return all of the disjointed groups, and their group sizes in descending order.I’d like to phone a friend
No you just start by marking all nodes as unvisited and perform a search from a random starting node. you store the current bfs set of vertices in a sorted datastructure. Repeat until there are no more unvisited nodes.
Bingo. For each node if it’s 0 continue if it’s 1 then bfs to get everything. Store that group temporarily and mark which nodes you’ve seen. For the remaining nodes check if they are 1 and you have not seen it and continue. O(n log n) I believe, since you still iterate over everything and check
Thanks friend!
I think this is basically testing:
Correct! I don’t like it, but gotta play the game if you want to make the cash