filmov
tv
LeetCode Problem 28. Find the Index of the First Occurence in a String || Java Solution Walkthrough
Показать описание
LeetCode is a great platform for people who want general coding practice, whether that be for interviews or just wanting to practice their problem solving. I will be taking you through all the steps of finding the optimal solution to each problem on the site following a logical ordering setout by LeetCode themselves.
In this video, we are going over the problem 28. Find the Index of the First Occurence in a String and the goal is to loop through the entire string and determine whether or not an exact string called needle is contained inside of a string called haystack.
There are two ways we can approach this, we could either cheat the problem and use the included String method called indexOf, or we could use a technique called the sliding window technique, where we try to match the String we are looking for inside the haystack based on the size of that needle string.
~~~ Stay Up To Date With My Social Media ~~~
#unknownkoder #leetcode #algorithms
In this video, we are going over the problem 28. Find the Index of the First Occurence in a String and the goal is to loop through the entire string and determine whether or not an exact string called needle is contained inside of a string called haystack.
There are two ways we can approach this, we could either cheat the problem and use the included String method called indexOf, or we could use a technique called the sliding window technique, where we try to match the String we are looking for inside the haystack based on the size of that needle string.
~~~ Stay Up To Date With My Social Media ~~~
#unknownkoder #leetcode #algorithms