Thursday, March 10, 2022

Comprehensive Data Structure and Algorithm Study Guide

 

Here is the article.

Others

1. String Processing: Follow the string section from CP Algorithms Site.
2. Bit Manipulation: Follow HackerEarth Bit Manipulation Tutorial and also Fun with Bits Tutorial.
[Comment if you have any other topic in mind]
Nota Bene(N.B): I didn't cover the study materials for advanced DS like SegTree, Fenwick tree/ BIT, Sparse Matrix etc. And also some non trivial algorithms. Don't worry about these, you won't face them in an interview in 95% case at least for entry levels or a bit higher from entry. But if you are studying for CP, good luck, just study everything you see on the fly.😛 And you might have seen i tried to categorize CI and CP guys as to differentiate the volume of study materials for each of them.
Tips:
 While 1:
	print("Deliberate Strategic Practice")
	print("Study and implement New DSA")
	print("Simulate real environement and test yourself") # do contest, contest and contest
and its cliché i know! But it's the only way. There is no secret sauce really. Suppose you just read backtracking from an article or may be a video, then why not solving 10 DFS and Backtracking tagged question in LC at a stretch ?. In university, i saw my classmates and seniors with no cs knowledge became red coder in CP platforms within ~1-2 years. Their secret is nothing but Regular Deliberate Strategic Practice. They always try to solve questions beyond their comfort zone and do it regularly. And that is it really. Always solve questions that you are not comfortable with, push yourself. Try to solve topic wise after you get a good general grasp of DSA. Find your weakness and work on it. Hard work will pay you off one day.

Other comprehensive CI (and CP) prep guides: (Comment if you know any good material)

Just want to finish with one of my favorite quote by Mark Manson:

""I wanted the reward and not the struggle. I wanted the result and not the process. I was in love not with the fight but only the victory. And life doesn't work that way.""

Hope this will help you a bit to ace your next coding interviews or competitive programming contest. Any suggestions on improving materials or adding materials will be highly appreciated.

Leetcode discuss: How to effectively use LeetCode to prepare for interviews!!

Here is the article.

How to effectively use LeetCode to prepare for interviews!!

Last Edit: February 3, 2021 3:05 PM

184.7K VIEWS

 I have been actively using leetcode as a platform to prepare for interviews for over 4 months now, and I feel I have learnt a few things along the way, that might or might not be useful for the other person looking for some direction, and getting a clear idea of how to progress on this journey.

[EASY]

[MEDIUM]

[Other points to note]

  • Leetcode is a wonderful community to learn, discuss and find support in others going through the same process. Leverage it.
  • Don't shy away from being a part of discussions, ask for help, or ask questions from others just because you feel it sounds stupid.
  • Constantly read articles on Leetcode, not only related to solutions but interview experiences, problems faced during the process etc. You can benefit so much from learning about stories of others here and also derive a sense of belonging to the whole process.
  • Make notes of all what you have learnt from a question, a trick or techinque for these will be handy when you will need to revise.
  • It's okay to feel lost, confused or difficult to solve questions at times. Some questions are harder than others, some are trickier and some have no solid pattern to them. Don't get intimidated by the process. With time and practise everything gets better. Have patience and don't lose hope.

In the end, I want to mention that I am still not 'perfect' in solving problems, but leetcode have taught me a lot and I have definately come a long way in this process, and with a little guidance, determination and patience anyone can.

Any updates to the list are welcomed, so are any questions and do share your experiences of your leetcode journey, for everyone can benefit from each other's experiences.
Good Luck and Happy Leetcoding!

leetcodeinterviewsmust-seeinterview preperation

Topic wise problems for Beginners

Topic wise problems for Beginners

Last Edit: February 3, 2021 3:06 PM


Here is the link. Leetcode profile is here. 

39.0K VIEWS

I have started my Leetcode journey from 3 months, and I have solved few problems along the way. I had to manage my college courses and prepping up Algorithms and Data Structures, so I wasn't able to grind as much problems as I would have liked to.

Prepping up Data Structures and Algorithms

I used another platform for reviewing basic data structures and algorithms. I never really prepared algorithms seriously, so I decided to review all basic algorithms and ds. I started coding basic data structures and reviewed basic algorithm paradigms and solved first 7-10 problems from each topic. This helped me in warming up with the topic and I was aware of basic tricks associated with basic problems.

Learning Collections / STL library

Start learning STL/Collections library if you haven't heard of it. Even though we can code up basic sorting, simple data structures such as stack/queue, we don't always have to code them while solving problems, we can always use them to fast track solving problems, so we can spend time in solving our problem, rather than coding the repititive algorithms and data structures.
More Info.

List of Problems topic wise

Finally, here is a list of problems that I solved topic wise and wasn't able to solve them in the first chance. I used solutions / discuss to check the approach of solving problems. Few are some which are worth revisiting. Finally, I have solved around 137 problems, so that should suffice for a beginner to onboard with the process of leetcode grind.

*Click on the topic to save the list
Two Pointers
  1. #75 Sort Colors
  2. #80 Remove Duplicates from Sorted Array II
  3. #88 Merge Sorted Array
  4. #457 Circular Array Loop
  5. #713 Subarray Product Less Than K
  6. #845 Longest Mountain in Array
  7. #904 Fruit into baskets
  8. #925 Long Pressed name
  9. #986 Interval list intersections
Binary Search
  1. #33 Search in rotated sorted array
  2. #69 Sqrt(x)
  3. #153 Find min in rotated sorted array
  4. #349 Intersection of two arrays
  5. #441 Arranging coins
  6. #475 Heaters
  7. #658 Find K closest elements
  8. #911 Online Election
Hashmap
  1. #463 Island Perimeter
  2. #535 Encode and decode TinyURL
  3. #575 Distribute Candies
  4. #739 Daily Temperatures
  5. #748 Shortest Completing Word
  6. #811 Subdomain visit count
  7. #884 Uncommon words from Twos sentences
  8. #953 Verifying an Alien Dictionary
  9. #961 N-Repeated Element in Size 2N Array
  10. #1160 Find words that can be formed by characters
  11. #1078 Occurences after bigram
Stack
  1. #496 Next Greater Element I
  2. #682 Baseball Game
  3. #856 Score of Parentheses
  4. #946 Validate Stack Sequences
  5. #1190 Reverse Substrings Between Each Pair of Parentheses
  6. #1209 Remove All Adjacent Duplicates in String II
String
  1. #468 Validate IP Address
  2. #522 Longest Uncommon Subsequence II
  3. #539 Minimum Time Difference
  4. #553 Optimal Division
  5. #791 Custom Sort String
  6. #833 Find and replace in String
  7. #835 Image Overlap
  8. #893 Groups of Special-Equivalent Strings
  9. #1156 Swap For Longest Repeated Character Substring
Sliding Window
  1. #424 Longest Repeating Character Replacement
  2. #1040 Moving Stones Until Consecutive II
Tree
  1. #101 Symmetric Tree
  2. #108 Convert Sorted Array to Binary Search Tree
  3. #226 Invert Binary Tree
  4. #538 Convert BST to Greater Tree
  5. #543 Diameter of a Binary Tree
  6. #637 Average of Levels in Binary Tree
  7. #654 Maximum Binary Tree
  8. #669 Trim a Binary Search Tree
  9. #589 N-ary Tree Preorder Traversal
  10. #894 All Possible Full Binary Trees
  11. #979 Distribute Coins in Binary Tree
  12. #993 Cousins in a Binary Tree
  13. #1022 Sum of Root To Leaf Binary Numbers
  14. #1104 Path In Zigzag Labelled Binary Tree
  15. #1110 Delete Nodes And Return Forest