i was asked to find a bag in a program.
Sigiloso
Your question is unclear: you were asked to find a bag in a program? Do you mean "a BUG"? How did you handle the question? Did you run the code? Did you see the bug? Any error messages? Did you manage to find the bug? The way to solve this kind of question is: 1. Listen carefully to the directive you are given and follow them. 2. Go over the whole code quickly, try to find things that look weird. 3. Run the program in DEBUG, skipping all breakpoints, look for "unhappy" flow (e.g., 1+1=3, etc.) and error messages in the console and/or log files. 4. For each error message: copy it and look for it in the code, and put breakpoints. 5. Run the program in DEBUG with the active breakpoint you marked, and understand the flow, why, and where it broke. Important: BE FOCUSED, watch the time. It's a technical interview - the cause is simple, so is the solution. It shouldn't take you more than 15 minutes, much less if you are a senior developer.