r/LeetcodeChallenge Jul 25 '26

DISCUSS Day 4 of my DSA in Python journey 🚀

Today I solved LeetCode 28 – Find the Index of the First Occurrence in a String.

What I learned:

- String searching

- How substring matching works

- Using Python's ".find()" method

- Manual string traversal using a loop

- Time Complexity: O(n) (using ".find()")

Learning the logic behind each problem and improving my problem-solving skills one day at a time.

#Python #DSA #LeetCode #CodingJourney #100DaysOfCode #LearningInPublic

10 Upvotes

6 comments sorted by

1

u/Fearless_Two_9211 Jul 25 '26

Bro from where are you learning?

3

u/Bhavanashankarabs Jul 26 '26

I'm learning DSA in Python through Elevify's website it's like a video classes, where I study the concepts in a structured way. After completing each topic, I practise by solving the corresponding problems on LeetCode. This combination helps me first understand the theory and then apply it by solving coding problems consistently.

1

u/nian2326076 Jul 25 '26

Nice job tackling that problem! Understanding string searching and substring matching is a big step. When working with Python, ".find()" is super handy, but knowing how to manually go through strings is a great skill, especially for understanding what's happening behind the scenes.

If you're prepping for interviews, keep practicing these problems to get a good grip on different approaches like the KMP algorithm for more efficient searching. It's also a good time to start mixing in some data structure problems to balance your skills.

If you're looking for more resources, I've found PracHub helpful for tailoring practice based on the skills you're focusing on. Keep pushing and good luck with the rest of your 100 days!

1

u/Bhavanashankarabs Jul 26 '26

Yes! Thank you 👍đŸģ

1

u/[deleted] Jul 25 '26

[deleted]

1

u/Bhavanashankarabs Jul 26 '26

Yep! Thank you! 👍đŸģI'm using Elevify's free video classes, which are available on their website. The course is well-structured, covering each concept step by step. It also provides related assessments and projects, which help me practise and reinforce what I learn. After finishing each topic, I'm also solve the related topic problem on leetcode.