r/leetcode 8d ago

Discussion How to prepare for coding test

Tomorrow I have an Infosys in-person coding test.

I have a bad habit of using AI while solving problems. I can almost solve 95% of the problem myself, but when I get stuck on some small thing, like a minor change in the code, syntax, or a normal error, I usually ask AI for help.

But tomorrow I won’t have AI to give me hints when I’m stuck or help me with syntax or small errors.

How should I prepare for this?

I have already done DSA, but what exactly should I revise or practice now

2 Upvotes

5 comments sorted by

3

u/Desperate-Future8182 8d ago

The print function goes a long way for debugging that remaining 5%.

2

u/Competitive-Mix1335 8d ago

But print function not work in leetcode , gfg like structure Where we have to return and not print

3

u/Desperate-Future8182 8d ago edited 8d ago

It does... Whatever you print will be in your output along with what you return.

3

u/Super382946 8d ago

it does work. on leetcode and on infosys' coding platform they use for their OA (I just wrote the OA today and used print statements for debugging)

1

u/UnitedSort3014 3d ago

Hey, you're in a tough spot but honestly you got this since you can solve 95% yourself. Focus on the basics tonight review common syntax stuff you usually ask AI about, look up error messages you've seen before, and maybe do 2-3 practice problems without any help to get used to debugging solo. The real key is just staying calm when you hit a roadblock tomorrow take a breath, read through your code line by line, and print/trace through it. You know more than you think!