Confused between solving coding problems and reading more solutions while preparing for interviews?

Hi, my name is Bharat Khanna and I am one of the Co-Founder here at Programming Pathshala.

This is a question that I get asked a lot at Programming Pathshala too. Or its other variations like — “How much time should I spend on a problem before reading its editorial?

During my preparation of coding interviews, I used to divide problem solving into following parts -

  1. Reading and understanding the problem — Let’s take an example problem. This problem looks very complicated by its statement. But, if you calmly try to understand it, you will get that it just wants you to look at all the query subarrays for different [l,r]. Those subarrays which have a positive sum should be taken in the answer and their sum is to be added to the total answer.

You should analyse during your preparation the weak part.

  • If part 1 is weak, try to practice reading multiple questions and dry running your understanding on sample cases.

To answer your question, ponder hard and try to at least reach till part 2 always. Then if you are unable to improve beyond a certain point in part 3, ask for hints if you have mentorship. If not, go for the editorial but note down the pattern you missed and make sure the pattern gets mapped for future :)

Hope you found it useful!

For more information, you can also login to www.programmingpathshala.com and take a free trial today.

Have a doubt? Reach out to us at info@programmingpathshala.com

--

--

We are working to democratise access to Tech Education. We help students learn coding and be confident about themselves.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Programming Pathshala

We are working to democratise access to Tech Education. We help students learn coding and be confident about themselves.