Tech IndustryOct 5, 2019
Credit KarmaBeffJesoz

Tarjan Algorithm in FB interview

Some cool kid at Facebook thought asking Tarjan algorithm related problem will be a great test to see my problem solving skills!

Poll
244 Participants
Select only one answer
Google Metrics Oct 5, 2019

To test your "critical thinking and creative problem-solving skills" smh

Credit Karma BeffJesoz OP Oct 5, 2019

I wish I was that critical thinker and creative problem solver as Tarjan 🥺

Google Metrics Oct 5, 2019

I doubt Tarjan himself solved it under 30 minutes. Your interviewer must think Facebook only hires otherworldly geniuses like himself.

Apple 🐒codemonk Oct 5, 2019

To test your memory on leetcode

Microsoft sikerro2 Oct 5, 2019

Tarjan has authored/coauthored so many algorithms. Which one are you referring to? Sorry but something about the way you ask this looks pretty ignorant.

Google Metrics Oct 5, 2019

probably for SCC, as it is better-known outside academic circles

Credit Karma BeffJesoz OP Oct 5, 2019

Yes. Related to SCC. If you google Tarjan geeksforgeek you can see the algorithm

IBM shabbat Oct 5, 2019

SCC questions are very fair game for top-tier interviews

Microsoft Flatlinerz Oct 5, 2019

Your vote is missing a "wtf is that" option I really like that Two Worlds song though by Phil Collins

Box TamG67 Oct 5, 2019

Did the interviewer actually ask you to find SCC using Tarjan's algorithm only? That would be oddly specific. Or were you allowed to use other algorithms like Kosaraju's or union-find to find the SCC?

Google Metrics Oct 5, 2019

/following

Credit Karma BeffJesoz OP Oct 5, 2019

It was SCC problem structured as network of roads. No specific algorithm use was stated of course. Optimal answer was Tarjan I could think of. I was aware of Kosaraju but Kosaraju is even more niche than Tarjan.

Facebook ⭕w⭕ Oct 5, 2019

Won't be long before we're expected to know techniques like bitmask DP, these interviews will eventually become Div1 contests on whiteboards.

Oracle pzd Oct 5, 2019

Wtf is tarjan algorithm?

Credit Karma BeffJesoz OP Oct 5, 2019

It's used to find SCC