Today was a rewarding day as I tackled a LeetCode question that challenged my problem-solving skills.
The problem at hand required finding the index of the first occurrence of a given substring within a larger string. Sounds straightforward, right? But as I delved into it, I realized that this task had the potential to test my string manipulation skills and knowledge of algorithms.
I started by understanding the problem statement thoroughly. To solve this, I employed the concept of string traversal. I looped through the larger string, checking if the substring matched the characters at the current index. If it did, I found the first occurrence and returned its index.
As I wrap up Day 32, I'm ready to take on more challenges and further enhance my DSA skills. Join me for Day 33, where we'll explore another exciting aspect of Data Structures and Algorithms with C++. Happy coding, everyone!