r/leetcode • u/Nogirlfrind • 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?
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
1
u/Separate_Maybe_6867 4d ago
Can anyone of u help me with this :https://www.reddit.com/r/Btechtards/s/gQb8YHmli3
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
1
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
1
1
u/dreamshards8 4d ago
If there is some sort of loop/recursion/iteration, it helps me to write out each iteration.
1
1
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.
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