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)

  • Scrubbles@poptalk.scrubbles.techOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    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.

      • eskimofry@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        2 months ago

        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.

        • Scrubbles@poptalk.scrubbles.techOP
          link
          fedilink
          English
          arrow-up
          0
          ·
          2 months ago

          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

    • GissaMittJobb@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      I think this is basically testing:

      1. If you have been practicing your leetcoding recently, and
      2. If you’re decent at leetcoding under pressure