Where to cover C++ language questions for FANG

Snapchat gqkO66
Feb 7 11 Comments

I recently interviewed at a C++ algo trading firm. I had two phone screens. The coding questions were leetcode easy, which I solved in five minutes flat. Yes, I had seen them before, and I hmm’d and hahh’d before I turned my brute force solution into the optimal one.

Then the questions turned to C++ specific ones. For example, polymorphism and C++11 specific locking. I had trouble solving them. In real life, I would simply look up the solution. And I said so.

I flunked both interviews. Which is annoying because I can solve most leetcode hard algo questions in C++11 quickly.

My question: where do I go to become good at C++ interview questions? Like “do exception throws result in destructors being called?”

Edit: the interviewers didn’t want me to regurgitate information. They were good interviewers. I had trouble applying C/C++ principles

yoe: 1
TC: 200k maybe, depends on Evan


Want to comment? LOG IN or SIGN UP
TOP 11 Comments
  • Amazon Sanchezos
    Don’t waste your time unless you really wanna work at those lower layers for your entire career. I learned C++ on the job but it was developing an OS. Effective C++ was a really good book to help in practice. Memorization is the lowest form of learning.
    Feb 7 5
    • New / Eng anagram
      I doubt you'd call it memorization if someone learns these principles while working and encountering such situations.
      Feb 7
    • Amazon Sanchezos
      Principles are different than semantics
      Feb 7
    • Snapchat gqkO66
      I haven’t read effective c++. People have told me that in the past, but truth be told, c++ language specifics never showed up in my college year interviews.
      I personally wouldn’t say c/c++ jobs are a waste of time. You never know what tomorrow has in store. Even java has a superior replacement in kotlin now, but rust and go have yet to put a dent in C++
      Feb 7
    • New / Eng HFT
      Agree with @anagram. The specific question that the OP asks is more of a principle one than a semantic one: principle here being when an exception is thrown, destructors must be called to avoid resource leaks.
      Feb 7
    • Amazon Sanchezos
      I don’t regret it. I understand memory allocation, stack vs. heap, pass by reference vs. value, multithreading, compilation, linking, compiler optimizations, gdb, core dumps, etc. It gave me a good foundation compared to others who I work with who started with Ruby or Python.
      Feb 7
  • Infinera nG0!#@
    Have been doing C++ professionally for 4 years now and I can’t tell that I know a good chunk of the language. For example, no amount of leetcode will explain what reinterpret_cast can do if you have not done it in the past. These perils of C++ comes only by practice and only if you are using a large code base. Sure, people can write vehicle, car classes and you can find these online. But only when you write these professionally do you get exposed to these perils. For example, why would you mark an API as final in one of the last derived class? Why would you write a private constructor or even destructor for example? I believe these come only by learning the language in a large code base. When I started interviewing, I was expecting more of these questions than leetcode ones. Unfortunately, I found out that every interviewer was keen on finding if the interviewee was able to solve leetcode questions. That’s when I got leetcode premium and appearing for interviews. I cracked a few ones that I knew relied on C++ but would never question my knowledge in C++ beyond leetcode solutions.
    Feb 7 0
    • LinkedIn peacefuel
      My friend told me about this book so long ago but it did have interesting questions.
      Feb 8
  • Dropbox jLgb07
    Why C++? FAANG interviews are much easier in Python even if Python isn’t your everyday language.
    Feb 8 0
  • Uber yTzY24
    You need to learn C++ properly, not just the small subset used for Leetcode. Buy a book, read it, and do all the exercises.
    Feb 7 0


    Real time salary information from verified employees