Word Pattern Matching using Backtracking | Leetcode Solutions in JAVA

  Рет қаралды 14,330

Pepcoding

Pepcoding

Күн бұрын

Пікірлер: 40
@ghanibhai1630
@ghanibhai1630 3 жыл бұрын
did it on my own Thanks to god and Summet Sir
@mehulshrimali1951
@mehulshrimali1951 4 жыл бұрын
Great Explanation bro!!!........
@hariomsingh1736
@hariomsingh1736 2 жыл бұрын
you are awesome sir
@himanshuchhikara4918
@himanshuchhikara4918 3 жыл бұрын
sir bahut mast but I have one suggestion for you please write time-complexity and space complexity in editorials on pepcoding portal for this questions specially backtracking vaale
@Pepcoding
@Pepcoding 3 жыл бұрын
Noted
@ankitamehra5045
@ankitamehra5045 4 жыл бұрын
arrey sir, yeh tshirt badiya hai ekdum!
@Pepcoding
@Pepcoding 4 жыл бұрын
haha. thank you. webinar karao, aapko bhi bhej denge. Also a very cool laptop bag.
@code7434
@code7434 4 жыл бұрын
alag level :)
@Pepcoding
@Pepcoding 4 жыл бұрын
thank you. If you like the content, please share and subscribe. If you can help me get a webinar, we can send you some cool pepcoding goodies
@mehulbisht9708
@mehulbisht9708 4 жыл бұрын
sir i had 2 major doubts , 1) 14:41 sir , are these answers also valid as per the given problem ? {p=g, e=oodbad} {p=go, e=odbad} {p=goo, e=dbad} {p=good, e=bad} {p=goodb, e=ad} {p=goodba, e=d} 2) also, sir if we are given first string as "ppe" or "epp", but not "pep" but the other string is the same, i.e. "graphtreesgraph", will this approach still work ?
@Pepcoding
@Pepcoding 4 жыл бұрын
for 2. yes, ppe aur epp ke case mei answer he nahi aaega. same order jaroori hai. for 1. yes
@mehulbisht9708
@mehulbisht9708 4 жыл бұрын
@@Pepcoding nice to hear this ! otherwise i would be thinking that the code that i made without watching solution was incorrect !
@tonystarc9567
@tonystarc9567 4 жыл бұрын
Sir what about pattern "abba" and string "dog dog dog dog" here this is taking dog as 'a' and dog as 'b' and we want 'dog' to be only taken by exactly 1 character of pattern. Hence it is given false for this case and my output is coming true.
@Pepcoding
@Pepcoding 4 жыл бұрын
Beta mera solution is case mei false he dega
@shauncrasta619
@shauncrasta619 3 жыл бұрын
@@Pepcoding No sir its giving true
@abhishekjha8220
@abhishekjha8220 Жыл бұрын
Tm space hta do to a=dogd , aur b=og ,se ye ho jayga
@mrmagician5609
@mrmagician5609 3 жыл бұрын
Was able to do without watching the video. Thanks!
@Pepcoding
@Pepcoding 3 жыл бұрын
Glad I could help!
@harishgaddapara1511
@harishgaddapara1511 3 жыл бұрын
Great Explanation sir! we are putting only unique chracters in the map so why we need to use hashset again
@boredpotato6366
@boredpotato6366 2 жыл бұрын
Because the answer has to be printed in same order as the original pattern. If we loop on map.keySet() then it will give answer in random order.
@mohitmittal10
@mohitmittal10 2 жыл бұрын
lot of likes :)
@CodeCraftWithVinayak
@CodeCraftWithVinayak 4 жыл бұрын
please discuss time and space complexity, mene try kiya derive karne but difficult laga.
@Pepcoding
@Pepcoding 4 жыл бұрын
hanji. bhool ja rha hai. shuru karunga
@harshtekriwal131
@harshtekriwal131 4 жыл бұрын
Sir isme ek issue aaskta hai , lets say string is dogdog and pattern is ab, then there will be a case where it will map 'a' with "dog" and 'b' will also be " dog" , basic according to this , two different characters can have the same mapping.
@LegitGamer2345
@LegitGamer2345 3 жыл бұрын
make a map of count of values , if count of any value is >1 then dont print here dog->2 so dont print just return
@yuvraj2038
@yuvraj2038 2 жыл бұрын
Time complexity?
@tusharjha2150
@tusharjha2150 4 жыл бұрын
Aaj 5 savaal minimum 🙈
@Pepcoding
@Pepcoding 4 жыл бұрын
poori koshish rahegi. 2sra bna dia already. aa rha hai
@SCRIPTSAG
@SCRIPTSAG 4 жыл бұрын
Sir deeply tree answer tak ka bnana pda tab jaker clear huwa actually ho kya rha hai question ka logic pakdne me thoda thoda miss ker ja rha hu i think sir practice kerte rahunga ek din jaruar ho jayega
@Pepcoding
@Pepcoding 4 жыл бұрын
Hanji beta, aise he lge rho aur sbka euler tree bnane ki koshish kiya kro.
@dtu-tech
@dtu-tech 4 жыл бұрын
Sir telegram channel link no exist
@Pepcoding
@Pepcoding 4 жыл бұрын
t.me/pepcoding
@yeshisrivastava2408
@yeshisrivastava2408 2 жыл бұрын
but this doesnt work! I tried it with same code .. did anyone tried it??
@yeshisrivastava2408
@yeshisrivastava2408 2 жыл бұрын
@@Kashish_Batra can you share the leetcode link of your solution?
@frankfill2050
@frankfill2050 3 жыл бұрын
I think this solution would fail with this test case => pattern: "ab" and string: "aa"
@anjneykumarsingh4461
@anjneykumarsingh4461 4 жыл бұрын
Sir goodies asey hi mt dijiye koi contest k through milta toh mza ata
@Pepcoding
@Pepcoding 4 жыл бұрын
apne paas 3000 bag rakha hai. aise bhi kar lenge aur waise bhi
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 14 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 38 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 53 МЛН
LeetCode 290. Word Pattern Solution Explained - Java
8:58
Nick White
Рет қаралды 15 М.
How to Solve Sudoku using Backtracking | Recursion
31:18
Pepcoding
Рет қаралды 84 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 98 МЛН
The Backtracking Blueprint: The Legendary 3 Keys To Backtracking Algorithms
13:44
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 14 МЛН