Tech IndustryFeb 7, 2019
SnapchatgqkO66

Where to cover C++ language questions for FANG

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

Amazon Sanchezos Feb 7, 2019

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.

New
anagram Feb 7, 2019

I doubt you'd call it memorization if someone learns these principles while working and encountering such situations.

Amazon Sanchezos Feb 7, 2019

Principles are different than semantics

Infinera nG0!#@ Feb 7, 2019

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.

Uber yTzY24 Feb 8, 2019

You need to learn C++ properly, not just the small subset used for Leetcode. Buy a book, read it, and do all the exercises.

Dropbox jLgb07 Feb 8, 2019

Why C++? FAANG interviews are much easier in Python even if Python isn’t your everyday language.

LinkedIn peacefuel Feb 8, 2019

My friend told me about this book so long ago but it did have interesting questions.