Find the index of the first occurrence in a string Leetcode problem number 28 using IndexOf() Time Complexity: O(n) JAVA interview programming playlist: • Interview Programming ... #java #interviewquestions #leetcode
Пікірлер: 11
@codecreww Жыл бұрын
Very nice, keep posting new videos
@dianakyrychyk3731 Жыл бұрын
Thank you! 😃
@quickknowledge1401 Жыл бұрын
Nice explanation
@kritikagupta5281 Жыл бұрын
you have used an inbuilt function 'indexOf' in JAVA. i don't think this is the expectation, the expectation of this question is to implement the said 'indexOf' function. Your solution and title solving in O(n) are misleading
@TechnosageLearning Жыл бұрын
IndexOf() also runs in linear time..internally it iterates through each element one by one,so time complexity of this operation is always O(n).. So we can definitely use indexOf() function to solve this problem...There is no need to implement to solve this Problem..
@royalsingh9400 Жыл бұрын
Logic kaise develop kare. Mujhe qus nhi hota bina solution dekhe
@TechnosageLearning Жыл бұрын
Its ok agar aap initially solution dekh rhe ho. Apke ek solution dekhne se same logic ya type k baki questions khud se krne mai help milegi.
@balajib24982 ай бұрын
This might be misleading. n real interviews they wont accept this indexOf() predefined things, they wanted implementation from ground to check our knowledge, I won't say this is wrong but it will be better if you explain the other non pre defined approaches like Knuth-morris-pratt algorithm so it may help your subscribers who preparing for interviews.