Find the index of the first occurrence in a string | Leetcode 28 | O(n) time Complexity

  Рет қаралды 3,636

Technosage

Technosage

Жыл бұрын

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
@codecreww Жыл бұрын
Very nice, keep posting new videos
@dianakyrychyk3731
@dianakyrychyk3731 Жыл бұрын
Thank you! 😃
@quickknowledge1401
@quickknowledge1401 Жыл бұрын
Nice explanation
@kritikagupta5281
@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
@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
@royalsingh9400 Жыл бұрын
Logic kaise develop kare. Mujhe qus nhi hota bina solution dekhe
@TechnosageLearning
@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.
@balajib2498
@balajib2498 2 ай бұрын
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.
@TechnosageLearning
@TechnosageLearning 2 ай бұрын
There is one more video for another approach..
@hariprasad2697
@hariprasad2697 Жыл бұрын
S U P E R B☀️💗✨
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 5 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 63 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
Search Insert Position | Leetcode 35
15:30
Technosage
Рет қаралды 8 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,5 МЛН
Big O Notation, Time Complexity | DSA
21:17
Telusko
Рет қаралды 58 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 623 М.
PhD AI student explains how China already have won in AI..
13:28
livinlavidaluke
Рет қаралды 43 М.
541 Leetcode problems are NOT enough.
7:12
Sahil & Sarra
Рет қаралды 157 М.
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,1 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 57 МЛН
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 1,7 МЛН
Как распознать поддельный iPhone
0:44
PEREKUPILO
Рет қаралды 2 МЛН