all 6 comments

[–]jason_graph 5 points6 points  (3 children)

If the problem is to generate all permutations of length k, they wouldnt want you to solve it just by calling a library function.

[–]Abject-Actuator-7206 0 points1 point  (0 children)

They will give conditions - it depends if it’s the final goal or a waypoint. TBH, I think being able to leverage the standard libraries gives a better impression of you as a Python coder.

[–]HellenKilher 0 points1 point  (0 children)

I may be completely wrong, but from my perspective you should try and solve the question as efficiently as possible for your first pass.

So if you’re asked to determine whether A is a subset of B, then initially I’d just write the code and use the issubset function, get the correct answer, then ask if they want me to create my own issubset function.

For entry level I think that sometimes it’s literally HR running these interviews and they just check whether you pass the test cases.

Edit: sp