Tomorrow I'm going to take a coding test. The problem is that I passed the test 8 months ago. I took the questions and managed to solve them all by myself. I was even invited for a face to face interview. But it was canceled due to COVID.

The company where I want to apply forgot about me. They want me to take the same test again. It's bothering me a lot. It keeps me awake at night. It's not ethical at all to do it. I can literally get 100% on a very hard test.

Is it possible to tell them that I already passed the test and that I don't want to take it again? Is it possible to take the test and note that I know the question and this is my solution? What should I do?

  • 44
    "It's not ethical at all to do it" - Why not? It isn't unethical to study for a test, is it?
    – T. Sar
    Sep 23, 2021 at 19:52
  • 9
    @T.Sar Because they know the questions already?
    – AIQ
    Sep 23, 2021 at 19:55
  • 59
    Are you 100% sure that the actual questions on tomorrow's test will be identical to the previous test?
    – Peter M
    Sep 23, 2021 at 19:55
  • 29
    @AIQ And? I did a billion fizz-buzzes already. I know it by heart. Is it cheating if someone asks me to do a task that I already did? The only thing a coding test checks is if you are able to pass a coding test, anyway.
    – T. Sar
    Sep 23, 2021 at 20:10
  • 8
    @Stef: Yes, it's a faux ami between French and English; in English it only has the "succeed" meaning.
    – psmears
    Sep 24, 2021 at 15:30

7 Answers 7


This is not an academic setting.

Through practice, you may do slightly better than someone who is a better programmer than you are. This will have little to no impact on the hiring decision. The coding test is used to filter candidates that cannot meet a minimum proficiency, and you are good enough.

If the company fails to account for the possibility that an applicant is assigned the test multiple times in successive applications, then that is a failing of theirs. You can reasonably expect that a company has a few versions of such tests and assigns those randomly.

If you’re indeed given the same test, just be honest about it and do the best you can. A likely scenario is that they’ll appreciate your honesty and ask you to elaborate on your solution for a few questions. Expect them to ask after a trade-off you decided to make, or an alternative solution. That discussion will tell them more about your ability than assigning you a different test.

If you are the original author of the answers you give, there is no dishonesty on your part. Not disclosing that their test questions have leaked online (and using results you found online to your advantage) would be unethical. Scoring 100% and (when asked directly) pretending that you’ve never seen the questions before, would also be unethical.

  • Mvz is it possible to put a comment before my solution. /*Dear Sir, I solved the problem at home. Here is my solution*/ is it ok to type that? Sep 23, 2021 at 20:08
  • 14
    @Hiho-Who'sMonica Just tell them that you have applied previously, have seen the questions before. Put in some extra effort, suggest an alternative solution to a question.
    – MvZ
    Sep 23, 2021 at 20:10
  • By the way, if you have your original answers at hand, I would recommend re-implementing over copy-pasting. If they assign the same test twice, I don’t expect them to do plagiarism checking. But I’d rather be safe than sorry.
    – MvZ
    Sep 23, 2021 at 20:28
  • 3
    yes of course. I even improved the code a lot! It's really very pretty. Thank youy Mvz Sep 23, 2021 at 20:37
  • 8
    @Hiho-Who'sMonica if you have very clean code, better than someone might expect for a first pass in a 3-hour time period, you absolutely must explain yourself, and this answer gives good tips for doing so. If you don't, they may suspect that you've "cheated" the test by copy/pasting from the web, and discount your application for that reason.
    – FreeMan
    Sep 24, 2021 at 17:04

Is it possible to tell them that I already passed the test and that I don't want to pass it again?

Of course it's possible.

Is it possible to pass the test and note that I know the question and this is my solution?

Of course that's possible too.

What should I do?

You should do whatever makes you comfortable, and allows you to sleep at night.

If it were me, I'd explain beforehand what transpired 8 months ago, and that I took the questions and solved them on my own.

I'd offer to take it again, if that's what the employer wanted. And I'd offer to take a different test, if that's what they would prefer.

  • 20
    +1 And they would probably appreciate the honesty.
    – camden_kid
    Sep 24, 2021 at 9:58
  • 9
    If they don't, @camden_kid, that tells you a lot about them as an employer...
    – FreeMan
    Sep 24, 2021 at 17:05

You are overcomplicating this and, it seems, misunderstanding why companies give coding tests.

It’s not to pose a challenge, it’s to see whether you have the skills needed for the job. Ideally they would just say “oh you took the test already never mind we can skip it.” But there’s nothing wrong with taking the same thing again. It’s not even like you flunked it and went home and studied just for it so your competence would seem higher than it is, you aced it the first time.

As a hiring manager, I say just retake it, ace it, move on. You are worrying based on entirely false assumptions.

  • It's more complicated when one of the skills needed for the job is solving problems the candidate hasn't encountered before.
    – ojs
    Sep 24, 2021 at 13:10
  • 1
    @ojs except, of course, they hadn't when they first took it (assuming). So giving the same answer is the same answer as when they hadn't encountered the problem. So no issue / no complication.
    – fdomn-m
    Sep 24, 2021 at 13:13
  • 1
    @freedomn-m Quoting the OP verbatim about re-implementing the answers: "yes of course. I even improved the code a lot! It's really very pretty"
    – ojs
    Sep 24, 2021 at 13:17
  • Nobody cares. If as the hiring manager I cared I’d go dig out his previous test.
    – mxyzplk
    Sep 24, 2021 at 13:52

I was in a similar situation the last time I looked for work. Apparently, there was a fad of asking candidates to write code to reverse a linked list, because three different people at two different companies asked me to do it in the same week.

The third time, I was afraid my answer would sound too rehearsed, so I told the interviewer it was the third time I had answered the exact same question that week, and would he prefer to give me something more difficult.

He asked me to humor him anyway, perhaps wondering if I was bluffing or overconfident about my previous answers. I was offered the job.

Bottom line, if you are up front about your situation, you have nothing to lose. The situation you are in is not your fault.

  • 3
    Actually, in after interview discussion that would definitely become a differentiating point during discussions on whether if an offer is to be extended.
    – LeanMan
    Sep 24, 2021 at 21:54

You can tell them that you already took the test earlier and don't mind taking it again. But the point is that you solved the problems.

They will see your solutions and decide whether you are for the job or not. In a programming test, it is not so important to solve the problem but how you solve it.

If your solutions are good, then you deserve the job. They will decide. With the knowledge that you took in the past, it is their responsibility. If there are better programmers than you, they will find another job.

Everybody has a bad day or a good day, be more prepared for something and less prepared for another thing. This is something on your path. You want that job, you apply, if they take you, it is yours.

You show responsibility and interest in your work by solving the problems at home, then honesty for telling them that you took the test already. These are important qualities as well.


If you tell them you already took the test eight months ago and they still want you to take it again, there’s no issue. You certainly can mention that you remember the questions and were able to get all the correct answers after the test but you have no ethical obligation to do so. As someone else pointed out, this isn’t an academic setting where honesty and integrity matters above all else. In industry, what matters is being able to accomplish goals by whatever means you have at your disposal. Words like “cheating” as it’s used in an academic context don’t really apply.

I once applied for a job that had a coding test component and the HR rep sent it to me in two parts—part A and part B. I did well on part A but poorly on part B. The following week, a different HR rep asked me if I’d taken the coding test. I told her I had but she couldn’t find the record. Finally she realized the test I’d been sent was the wrong version. It was supposed to be A and B together, not A then B. I told her I didn’t do as well as I could have and would be happy to take the other version if they wanted me to and she agreed. Turned out the questions were exactly the same! Nobody cared that I got a perfect score because I’d already seen the questions and had time to think about them. The test was a barrier of entry and I passed it.

This attitude is more or less in line with what’s generally valued in the workplace. If you do something that helps the company make money, the result is way more important than how you went about achieving it. Also, the fact that you remember all the details about a very hard test you took eight months ago is impressive in its own right.


I have seen a question/answer on this site where someone had to take a test that they wrote.

Which brings 2 points to light.

  • The test isn’t really about grading, it is more of a pass/fail with a minimum value (and that value may be well below the the 50% rate). While all other things being equal, a huge gap would probably go to the higher scorer. A one question difference might still be resolved with a flip of a coin.
  • You know what you know, and the test are an imperfect attempt to get a rough idea of what you know. I took the same C# test twice separated by a couple of years, and missed a question both times on how a generic class name or variable created by the compiler (the question was about which character was used for part of the name). This was (and still is) an absolutely stupid question, if memory serves it is actually an implementation detail that can change, and even if is defined by the standard, it’s only relevant when writing a compiler. I have never had anyone tell me that it’s a good question to judge how well someone knows generics —- but the companies that are interviewing aren’t writing these test, they have to deal with the test that exists.

In short, not an ethics problem and nothing to worry about. If you mention it and change happens, the most likely change would they would switch test takers.

  • Probably a stupid question but how would one even know what variable names are created by a c# compiler? Is it expected that you examine the code after each phase of compilation to make sure the implementation is as intended or something? Sep 27, 2021 at 15:02
  • 1
    @AffableAmbler: certain class names and class fields are created by the compiler, and the compiler naturally does so in a consistent manner, using characters that are allowed by the CLR but not legal in C# in order to avoid collision with names created by the user. These are frequently referred to as “unspeakable” names. But while the compiler needs to be consistent in a particular compilation in order to avoid internal collisions it doesn’t need to be consistent across compilation, it just hasn’t changed because there is no reason to. The general rules are known and/or documented.
    – jmoreno
    Sep 27, 2021 at 23:38
  • Gotcha, yeah that's a horrible interview question. Even if the naming convention was 100% consistent all the time, it basically amounts to an obscure bit of trivia (unless part of the job is writing a compiler that follows naming conventions). Sep 28, 2021 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .