20 Comments
Jul 21Liked by Ashish Pratap Singh

Great Stuff for revision, Can you Please Add more on DP section and Graph section .

Expand full comment
author

sure, will do.

Expand full comment
Aug 18Liked by Ashish Pratap Singh

Awesome for quick refresh

Expand full comment
Aug 4Liked by Ashish Pratap Singh

precious content

Expand full comment
Jul 31Liked by Ashish Pratap Singh

Thanks for sharing this valuable patterns sir .

Expand full comment
Jul 29Liked by Ashish Pratap Singh

awesome ! Have watched your youtube videos too ! Great work

Expand full comment
Jul 29Liked by Ashish Pratap Singh

For Prefix sum we need one check as if i=0 then prefix sum is array[j]

Expand full comment
author

agree.. that's an edge case we need to handle. Thanks for pointing it out.

Expand full comment
Jul 22Liked by Ashish Pratap Singh

Thanks a lot for sharing the pattern aspect to solve the problems..

Expand full comment
author

you are welcome!

Expand full comment

Great article! Completely agree with your points. One question- sometimes identifying the pattern can be difficult because one problem can have many patterns, and sometimes problems are tricky, so how do you get around that?

Love your work and hope to see more from you soon :)

Expand full comment
author

It takes some practice to be able to identify the right pattern for the problem at hand.

For tricky problem, it might be a good idea to brainstorm multiple patterns and see which one fits.

Expand full comment

As an example a lot of the subarray problems with prefix sum based solution also seem like a sliding window type problem. Any tips on differentiating those?

Expand full comment
Jul 21Liked by Ashish Pratap Singh

So awesome resource for Leetcode, thanks for sharing!

Expand full comment
author

thank you so much!

Expand full comment
Jul 21Liked by Ashish Pratap Singh

Well drafted.

Expand full comment
author

thank you!

Expand full comment

Can you also add one sample code implementation for the patterns with the best approach. Then it will be all at one place.

Expand full comment

Thank you

Expand full comment
Aug 18·edited Aug 18

Thanks for this article.

Expand full comment