I'm fairly confident that if you've studied hard enough to solve these problems easier the studying just paid off by making you a better developer.
I'm fairly confident that if you've studied hard enough to solve these problems easier the studying just paid off by making you a better developer.
https://www.teamblind.com/post/Should-you-tell-your-intervie...
only ppl GP is catching is ppl who havent' practiced that skill. Leetcode junkies are simply outsmarting him.
Also I will say that the few candidates who've tried lying about seeing a question before are not as good at acting as they think they are. Not only do you have to pretend that you've never seen the question before but if you don't stumble, second-guess yourself, refactor parts of it, etc. it's usually pretty obvious.
Now, if someone's a great actor and they've seen all four problems before and manage to impress the hiring manager -- well, what can you do. But I don't think there are very many of those.
what are some of the tells ?
2. Know various approaches more than ordinary people. "Ah we can solve this in various approaches. We can sort this one, and the problem will be log N, or we can use Heap and make it log K. We can use stack but does it get counted as space in the space complexity? Oh I can use deque here but let me just use Python list because Python list is very versatile, it can be anything, it can be array, can be queue, can be stack"
3. Know the solution right away even the non obvious ones. One example is the problem of next permutation. Given a number 1, 3, 2, 4, 5. Find the next permutation in O(n) time and O(1) space. This solution is easy but if you have never done it before there is no way you can come up with a solution complete with code. Another problem, given preorder and inorder list, construct the binary tree. There are many non obvious problems like this.
Kind of like that math teacher accusing me of cheating because I did well on the exam.
But to actually answer your question. Say the role is in JavaScript, say a Frontend role and the candidates want to answer it in Python instead of JavaScript. Then it is possible that the candidate is a Leetcode junkies.
Why I know? Because I do this myself. And definitely no points subtracted from knowing and using Python.
Debating if would be worth taking the hit of switching to python now.
In Python you just need to focus on the actual algorithms than the actual minuteae details such as "let me create a function to copy this array". As long as you are aware of limitations such as Python int has no restriction like Java (int32, int64) etc, because some problems require you to look into that restrictions. Python string concatenation is also O(n^2) because there is no stringbuilder in Python. Just be aware of those and it should be fine.