Topic wise problems for Beginners DS - Algorithms with LEETCODE

 

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

I haven't started solving problems from graphs and other intermediate topics, so I don't have them now, but once I have archive of some good problems, I would certainly share with the leetcode community.

Men' fashion , Dating Tips , Relationship Advice

Post a Comment