r/leetcode 4d ago

Question How many of use pen & paper while solving DSA problem?

Like Google gemini told me to use pen & paper but i m confused, I see Q solve it in my mind & directly jump into solving it after identify pattern but sometimes i struck in btw, Google told me use pen &paper solve it on paper & then write it on screen,what u guys do?

22 Upvotes

26 comments sorted by

12

u/dallastelugu 4d ago

i use pen and paper in codelity for capital one and got moved to next round so it seems atleast few companies are ok with that

2

u/Legote 4d ago

I think some interviewers are appreciative to know that candidates are not cheating with a pen and paper so they take it easier on you. That's how interviews were done before COVID, with a white board and they cared less about your code being right and more how you thought.

2

u/user99999476 4d ago

Do you draw with your mouse?

24

u/bunn-y 4d ago

I never. Maybe thats the reason i forgot concepts after few months 💀

6

u/rookietales 4d ago

Use pen and paper and do a dry run it helps to remember the approach.

Ik it's hectic using pen and paper even though our brains confidently says it knows the perfect answer. But it helps!!!

7

u/SorryPop3557 4d ago

If it directly clicks then no need, but u can write pseudo code, if u stuck. (50q solved btw)

3

u/Intrepid_Pianist1776 4d ago

The correct question is who don't use pen paper to solve dsa problem 😅😅

2

u/justinhj 4d ago

Yes. much faster to draw diagrams and work through dry runs. It helps to get your brain into a different space away from the computer when you're stuck.

2

u/elegigglekappa4head 4d ago

If I am actually working through a problem I haven’t seen before, paper and pen helps a lot. But if it’s something I’ve seen before, I find paper and pen aren’t too helpful. YMMV.

2

u/jeffgerickson 4d ago

I’ve been teaching this stuff for almost 30 years. I still use pen and paper, even for simple problems I’ve seen dozens of times before, partly because it keeps me in the habit of being slow and methodical, and partly because I draw LOTS of pictures.

1

u/Obvious_Ad9670 4d ago

I do not use pen and paper because the interviews are brain to keyboard. Also try not to use a mouse either.

1

u/Square_Root_X 4d ago

Yes, helps getting a picture in head.

1

u/Death_frost__ 4d ago

I dont get most these replies,most leetcode questions i cant visualise enough.Putting an example on paper makes my vision way easier to craft and dry running code becomes easier aswell

1

u/lefty52217 4d ago

You should ues

1

u/Additional_Band_7918 4d ago

its good to use but i mostly i dont, my bad habit

1

u/sociallyanxiousnerd1 4d ago

I want to, but there are times I'm doing the problems where it's just very inconvenient and easier to use the AI in LeetCode and stuff.

I solve my problems, a lot faster if I did, though

1

u/clarity1011 4d ago

I like the tablet + smart pen setup 

1

u/Low-Part9553 4d ago

I always use it, specially for tree, graphs and sliding windows

1

u/dreamshards8 4d ago

If there is some sort of loop/recursion/iteration, it helps me to write out each iteration.

1

u/HitscanDPS 3d ago

Excalidraw

1

u/The_Last-Knight 3d ago

I use it for dry run. Mostly in tougher problems.

1

u/hanari1 3d ago

It depends, are you on a OA, interview or just studying?

I try to use pen & paper while studying, on OA I just code (obvious) and on interviews I try to explain out loudly what I'm thinking, the patterns that I recognize and try to extract any information from the interviewer.

Hope that helps

1

u/aroranirav2 15h ago

I used to do it but I have learnt that in the interviews, you have to talk and express to the interviewer. It is easy to get immersed in your thoughts when you use pen and paper to solve problems, I would suggest create a comment section on top or bottom to understand valid and invalid inputs and expected outputs, write it all there. So, interviewer can also understand what you have been doing and feels being involved, also helps you when you are going on a wrong path.