Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

Brute-forcing my algorithmic ignorance (http://blog.dominikrudnik.pl)

101 points by qikcik about 18 hours ago | 56 comments | View on ycombinator

kixiQu about 12 hours ago |

I'm always interested in write-ups when folks try new attacks on self-study.

I will also admit that this part hurt my heart to read (vicarious embarrassment):

> the recruiter mentioned I needed to pay more attention to code debuggability (whatever this means - I assume that under the corpo-language, they mean that I wrote invalid code)

TrackerFF about 13 hours ago |

Note: I haven't done any tech interview in 6 years.

I'm kind of surprised they still do leetcode-style questions on remote interviews these days. I thought those types of interviews would be 100% gamed by now.

stephen_cagle about 12 hours ago |

> Find Minimum in Rotated Sorted Array

I've seen that problem in an interview before, and I thought the solution I hit upon was pretty fun (if dumb).

  class Solution:
      def findMin(self, nums: List[int]) -> int:
          class RotatedList():
              def __init__(self, rotation):
                  self.rotation = rotation
              def __getitem__(self, index):
                  return nums[(index + self.rotation) % len(nums)]
  
          class RotatedListIsSorted():
              def __getitem__(self, index) -> bool:
                  rotated = RotatedList(index)
                  print(index, [rotated[i] for i in range(len(nums))])
                  return rotated[0] < rotated[len(nums) // 2]
              def __len__(self):
                  return len(nums)
  
          rotation = bisect_left(RotatedListIsSorted(), True)
          print('rotation =>', rotation)
          return RotatedList(rotation)[0]

I think it is really interesting that you can define "list like" things in python using just two methods. This is kind of neat because sometimes you can redefine an entire problem as actually just the questions of finding the binary search of a list of solutions to that problem; here you are looking for the leftmost point that it becomes True. Anyway, I often bomb interviews by trying out something goofy like this, but I don't know, when it works, it is glorious!

Good luck on your second round!

ashwinnair99 about 14 hours ago |

The honest ones who admit they used it as a learning tool rather than a shortcut are getting more useful out of it than anyone else.

e12e about 15 hours ago |

Interesting article - but perhaps a bit light on details in some places, like:

> I generated a list of the most common interview tasks

How? I suppose they mean gathered, or searched for, not strictly generated?

Also a little light on details of the actual interview.

I'm also a little confused about the listing of "problems" - do they refer to some specific leet-code site's listing of problems?

It seems like half-way between naming an actual algorithm/problem and naming a concrete exercise.

As for:

> How is it that we do not use this "forgotten and forbidden" coding in our daily production code, even though all highly reusable, useful code is essentially an exploitation of the intersection between classical algorithmic thinking and real-world problems?

I'm not sure what to say - most of this stuff lives in library code and data structure implementations for any language in common use?

Indeed the one saving grace of leet code interview is arguably that it shows if the candidate can choose sane data structures (and algorithms) when implementing real-world code?

and12-qwd about 13 hours ago |

It is kind of odd to admit this before the second round of interviews. Perhaps glorification of LLMs is now a positive, but still it is a gamble.

It is also odd that this article appears here after someone complained about vibe coding killing the interest in algorithms.

This game is played often. People have valid complaints, then someone posts a "rebuttal" ("LLMs are not bad for $X---they are good for $X").

Anyway, he uses LLMs more in the search capability, which is less controversial than generative AI and vibe coding.

nico about 12 hours ago |

Recently had a coding interview in which I was allowed to search online but not use any AI. On the first google search, the interviewer realized that the first result is now AI generated and said I couldn’t use anything from there. So I had to just click on different links and piece together what I needed from inside the pages

gurachek about 14 hours ago |

Your "no compiler" rule on day 3 taught you more than the LLM did. The LLM made concepts click. But the binary search vanishing under interview stress proves that understanding something and being able to produce it under pressure are totally different skills. Nobody talks about this enough in the "just use ChatGPT to learn" discourse.

tom-blk about 16 hours ago |

Very cool, I have personally been studying zk-cryptography with a similar approach, works really well with some caveats. Will save this article and try this version as well when the time comes!

piokoch about 16 hours ago |

This is very interesting, I've been using LLM to learn new things that way and it really worked. To some extent, learning with LLM is better than taking any course, even with a tutor, as I am getting something prepared for me, in terms of my experience, progress level, etc.

LLM is going to change schools and universities a lot, teachers, tutors will have to find themselves in the new reality, as they have a strong competitor with infinite resources and huge knowledge, patient and ready to work with every student in a distinct way, according to student's needs, level, intelligence, etc.

Instruction-based tutoring is dead from that perspective, why should I follow someone reciting a book or online tutorial, while there is a tool that can introduce me into subject in a better and more interesting way?

Sure, there are great teachers, who are inspiring people, who are able to present the topic in a great way, the point is, they are minority. Now, everyone can have a great tutor for a few dollars a month (or for free, if you don't need generating too much data quickly).

doctorpangloss about 14 hours ago |

another POV is, it used to be cool to work for Google

it's been so uncool and harrowing for a while now, to deal with their leetcode BS. i mean obviously this guy is well meaning but didn't learn anything, other than for the paycheck and whatever desperate circumstances require that.

the LLM stuff being used to solve their interview process is an inflection point where it really steeply goes down to want to work for Google for any reason other than money

maybe this is why Google deepmind researchers keep leaving to start their own successful companies