izard: (Default)
[personal profile] izard
Now every technical interview involves a whiteboard/computer coding/solving of simple/medium level puzzles. As any sport, one needs recent practice to perform well. I did not practice in that since 1998, and I only had one such interview in ~2010 with google, where I failed.

I don't argue that it is not a worst proxy for evaluating programmer's job performance (in the same way as running speed/stamina is a proxy for evaluating football player skills).

I decided to spend some time to understand my current status and improve it a little bit. So I selected a random puzzle from hackerrank with medium rating and low average pass count.

It took me about 3 hours in total to come up with a correct O square algorithm, and one hour to implement.

This Clojure implementation by the way is probably not O square as it times out on bigger tests. So I need either to profile it and fix, or re-write in C where reasoning about execution time is trivial.

So if I got this puzzle at a Google/Facebook/whatever interview, I would have failed, as one needs to solve this in 30 minutes, not 4 hours. And when I encounter puzzles of similar complexity at work (not very frequently, maybe once every couple of months), solving it in 4 hours is never an issue.

Upd:
For two people, who are much brighter than me, it took several minutes to find the algorithm which is O(n) and describe in the comments. I implemented it (took me half an hour), and now it passes all hackerrank tests:


Profile

izard: (Default)
izard

June 2025

S M T W T F S
1234567
891011121314
15161718192021
22 23242526 2728
2930     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 30th, 2025 07:16 am
Powered by Dreamwidth Studios