Leetcode questions requiring particular tricks

AT&T sjdkal
May 14 15 Comments

How often do LC questions requiring very particular knowledge come up in coding interviews? As an example, LC 932 (Beautiful Array), requires a trick involving reversed binary representation or fast Fourier transform. Assuming you only get ~30 minutes in the interview, how far are you expected to get in such problems?

comments

Want to comment? LOG IN or SIGN UP
TOP 15 Comments
  • Amazon VpYJ78
    At this point Leetcode is used mostly by some second and third tier companies that know they have a subpar engineering culture and no good mechanisms for identifying and firing duds.

    Basically it's status anxiety that comes from knowing they have trouble delivering products but not knowing why.

    Google started this trend but they've phased out a lot of the memorization and gotcha questions. Unfortunately, some companies who are behind the times haven't caught on yet and are best avoided until they do.
    May 142
    • Amazon VpYJ78
      And just to clarify-- a few orgs in Amazon are absolutely garbage tier and if you had the misfortune to be interviewed by them, that sucks but isn't universal.

      Don't let it discourage you from considering Amazon in the future though, just apply to a different org!
      May 14
    • VMware / Eng!geralt
      So do DP questions come under this memorization questions? Some DP do require special tricks.
      May 14
  • BluVector sparked
    Coding interview questions should always have a brute force method for solution
    May 144
    • AT&T sjdkal
      OP
      Of course, the brute force for this particular problem is checking all permutations. I don’t see how the average candidate gets from this solution to an optimized solution with Fourier transform
      May 14
    • BluVector sparked
      Ideally there are multiple suboptimal solutions that you can iterate through without having to dive into differential calculus, but I do see your point. Personally I would never ask a question where the only answer I would accept required very specific complex math/algo knowledge...that’s basically a gotcha question and the guy who can whip out the answer on the spot would worry me more than the person who couldn’t
      May 14
    • AT&T sjdkal
      OP
      I completely agree. I’m an interviewer at my company and I would never ask this sort of question. Extremely low signal and doesn’t showcase the candidates skill set. Apparently this question originated from a google onsite which worries me.
      May 14
    • Google / Eng🍑☁️
      Some moronic interviewers write bad questions. There aren't really any guidelines here so people kinda just do their own thing.
      May 14
  • Apple etubrute
    I never ask a question that can’t be solved optimally through some combination of sorting, hash map, scanning, brute force, backtracking, or DP.

    Trick questions are the spawn of satan.
    May 141
  • New / Eng
    SanHolo

    NewEng

    BIO
    Tc = broke. Education: the Derek Zoolander school for kids who can’t read and want to do other stuff good too
    SanHolomore
    They come up when the interviewer doesn’t like your resume. I’ve gotten two sum at amazon and bit manipulation at a no name company like the one I work at...... it’s all luck...... practice and increase your odds.
    May 142
    • Autodesk boba415
      Agreed
      May 14
    • Amazon 76hcb9
      No name companies are more random since there is no interviewer training. I remember in one interview, all the interviewer wanted to do was to proof he is smarter than me.
      May 14
  • Don't worry. We have AI that can optimally solve out almost the entire library of LC questions in seconds. If you're relying on swe skills to remain employed, you should consider diversifying your skillset
    May 141
    • AT&T sjdkal
      OP
      Hard to do when getting the job is based on solving a particular 4-5 lc problems 😅
      May 14

Join verified employees in our anonymous social network!Download the app!

close