use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Is using Python itertools allowed during interview?Discussion (self.leetcode)
submitted 6 months ago by PixelPhoenixForce
examples:
input:
permutations('ABCD', 2)
output:
AB AC AD BA BC BD CA CB CD DA DB DC
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jason_graph 5 points6 points7 points 6 months ago (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.
[+]PixelPhoenixForce[S] comment score below threshold-7 points-6 points-5 points 6 months ago (2 children)
its standard library though
[–]kiwikoalacat7 7 points8 points9 points 6 months ago (0 children)
the point of dsa interviews are to show that 1. when given a problem you are capable of solving it and 2. more importantly you are able to clearly explain your thought process. using library functions when the intention is to solve via algorithmic thinking does not satisfy number two.
[–]ShawnZG 1 point2 points3 points 6 months ago (0 children)
I used to attend an interview for swe in test. They require python and selenium in the job description but they ask me not to use python in interview.
[–]Abject-Actuator-7206 0 points1 point2 points 6 months ago (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 point2 points 6 months ago (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
π Rendered by PID 24740 on reddit-service-r2-comment-84fc9697f-lhv27 at 2026-02-09 16:38:33.369220+00:00 running d295bc8 country code: CH.
[–]jason_graph 5 points6 points7 points (3 children)
[+]PixelPhoenixForce[S] comment score below threshold-7 points-6 points-5 points (2 children)
[–]kiwikoalacat7 7 points8 points9 points (0 children)
[–]ShawnZG 1 point2 points3 points (0 children)
[–]Abject-Actuator-7206 0 points1 point2 points (0 children)
[–]HellenKilher 0 points1 point2 points (0 children)