Tech IndustryFeb 3, 2020
Booking.comagjajabj

Python as a language choice for interviewing

I use python as my choice of language for interviewing. To prepare, I am Leetcoding right now, and am at an early stage. (50+ LCs). However, I am coming across problems now, which would benefit from TreeMap / TreeSet / Multiset. Things like insertion sort, with amortized O(log n) insertions are also not possible in python using the stdlib. I am wondering if this makes python a bad choice of a language, and how crippling this handicap is? Or do interviewers don't ask questions related to such Data Structures to python programmers? #leetcode

Add a comment
AQR DVGQ05 Feb 3, 2020

While the language doesn't matter, I would recommend picking something like Java. Python is great but just doesn't really have all these data structures and similar issues which other languages have.

Amazon 4cedOut Feb 3, 2020

When I go into an interview I already have the questions decided independent of the language the interviewee chooses to implement in. Having said that, most of the questions I ask can be solved by any developer that knows the language they are coding in well and can break the solution down sufficiently well. With me the only downside to interviewing in python is that most of our code is in Java and I think it's better to interview in the dominant language of the company you are targetting.

Microsoft mschvs Feb 3, 2020

If a candidate tells me they are using a fancy data structure from a specific language in order to skip the core of the question, I kindly ask them to implement the structure instead.

Microsoft travasty Feb 3, 2020

TreeMap/TreeSet = list + heapq + map I’d hate to have to implement it during an interview though

Google yoyodynе Feb 3, 2020

In whiteboard interviews you can just handwave it If you have to actually fully code the solution, learn how to write a treap or some other easy BST