I got the file permission question similar to https://leetcode.com/discuss/interview-question/417262/dropbox-phone-screen-permissions-in-a-file-system
and the follow-up was to modify implementation so that only the parent has access, for example:
A
-> B
----> C
if we have a set containing all the accesses {A, B, C}, remove B and C from the set since A has access.
After clarifying questions, I wrote a pretty clean code with helper methods and the interviewer looked satisfied. I updated my code for the follow-up question. Interviewer brought me an example showing that my code doesn't work in some cases but I explained him that my code gives a right result for the interviewer's example. Interviewer admitted that my code works for his example.
We had 10 minutes to the end of the interview and I asked questions about Dropbox culture, etc.
After the interview, I found that my code for follow-up doesn't give a right answer for some use-cases and neither I nor the interviewer could notice that. If either of us could notice, I had more than enough time to fix it.
I got the automated reject email and of course no response from recruiter about my feedback. I have a feeling that after the interview, the interviewer tried and ran my code on more test cases and pinpointed the issue. However, it became hard for him to let me move forward on a not 100% working code.
I believe a more experienced interviewer would do differently since the candidate was able to fix his code if he knew the not working sample. What do you think?