Elements of Programming Interviews in C++ or Python?

Bloomberg / Eng iVX372
Mar 13 11 Comments

I intend to buy this book and was wondering if anyone could compare the editions. The C++ version has a better average review score on Amazon, and I was wondering if the problems and solutions are identical in the Python and C++ editions (except for the programming language).

comments

Want to comment? LOG IN or SIGN UP
TOP 11 Comments
  • Facebook Probe
    Problems are the same of course. Solutions vary, I personally prefer the C++ version because some of the Pythonic shorthand they use, while elegant, can be hard to grasp (like using itertools and list comprehension as much as possible). C++ or Java version is more straightforward even if it's more loc.
    Mar 13 5
    • Bloomberg / Eng iVX372
      OP
      Makes sense. Thanks

      Do you know of a good Python itertools tutorial, excluding the docs? I'm a bit of a Python noob but would prefer to master it and interview in it
      Mar 13
    • Facebook Probe
      Python's docs are pretty solid with examples, so I would just reference that.
      Mar 13
    • Facebook Probe
      Also, just to be clear, I prefer using Python for interviews, but I use the C++ version of EPI. To be more specific, I use an older edition that had the ninja questions mixed in the chapters instead of at the end, which I think is better (more motivated to do the problems).
      Mar 13
    • Facebook / Eng 5'6"Indian
      Pymotw
      Mar 14
    • Bloomberg / Eng iVX372
      OP
      Thanks for the tips
      Mar 14
  • Google
    tsukino

    Google

    BIO
    w
    tsukinomore
    As someone who used C++ in interviews, I would recommend switching to Python. The 2x verbosity factor really makes a difference when you're crunched against writing long lines on a whiteboard. Less time coding, more time thinking.
    Mar 13 4
    • Microsoft
      wyba qnbab

      Microsoft

      PRE
      Google, Amazon
      wyba qnbabmore
      Did leetcode help you for your google interview? What else did?
      Mar 13
    • Google
      tsukino

      Google

      BIO
      w
      tsukinomore
      yes especially with linked list and limited memory constraints; personally, doing mock interviews (on whiteboard or paper) was also helpful for building confidence
      Mar 13
    • Microsoft
      wyba qnbab

      Microsoft

      PRE
      Google, Amazon
      wyba qnbabmore
      Who did you do the mock interviews with?
      Mar 13
    • Google
      tsukino

      Google

      BIO
      w
      tsukinomore
      some Googlers who knew the process
      Mar 13