773. Sliding Puzzle | BFS | Graph Traversal | Matrix | Array

  Рет қаралды 2,040

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 23
@jaykishanpatel1889
@jaykishanpatel1889 5 күн бұрын
nice explanation
@utkarshsahu6572
@utkarshsahu6572 2 күн бұрын
I think we can also use a Heurestic to be even faster, like A* algo, H will be number of misplaced tiles. This seems similar to puzzle solving problem in AI course.
@AdityaMaurya-uy2yj
@AdityaMaurya-uy2yj 4 күн бұрын
My concern is about swapping with zeroes. Let's say 0 is at (1,2) and my matrix is {{4,2,3},{1,5,0}} in this case if started i will look for zeroes index and swap with all around.I think in answer i will be getting moves including swaps of zeroes and by observation we can see 4,1 swap will can give potential target.
@satguy8481
@satguy8481 5 күн бұрын
Nice Explaination I would be glad if you introduce some course with solving hard question only
@Prakhar2-v7u
@Prakhar2-v7u 5 күн бұрын
great way of explaining
@ShubhamSharma-sf8wk
@ShubhamSharma-sf8wk 5 күн бұрын
Great explanation
@piyushgupta8920
@piyushgupta8920 5 күн бұрын
Great Explanation Bro! btw is that ipad you use?
@italk-gj5kk
@italk-gj5kk 5 күн бұрын
could you bring a one shot course for java for those who want to shift from c++
@noobnessmee
@noobnessmee 5 күн бұрын
just solve problems by converting from gpt and learn syntax. Its much faster.
@sundaramagnihotri5896
@sundaramagnihotri5896 5 күн бұрын
Bro why are you converting a Matrix into string ?
@yashmalviya0149
@yashmalviya0149 5 күн бұрын
Because it becomes costly to track a matrix
@sunshine-un1rk
@sunshine-un1rk 5 күн бұрын
8:06 Arrays cannot be used as key for visited right so converting the matrix as string we can check if the pattern is already visited or not...
@yashmalviya0149
@yashmalviya0149 5 күн бұрын
​@@sunshine-un1rk we can by using a custom hash function, as Aryan said it's difficult to get a good hash so we use strings
@sunshine-un1rk
@sunshine-un1rk 5 күн бұрын
@@yashmalviya0149 yeah ok..😅
@naturesrevolution
@naturesrevolution 5 күн бұрын
​@@yashmalviya0149ok another question why we use while(size-- >0) ? Because while(!q.isEmpty()) itself will do bfs level wise.. then why while(size-- >0) ?
@Zomb-zj4ip
@Zomb-zj4ip 5 күн бұрын
broski ur entire audience watches you because theyve been coding in cpp, if you suddenly change to java thats not gonna work out for us :/
@arunm619
@arunm619 5 күн бұрын
Broski fellow cpp dev here. People who code in Java usually find the intricacies of cpp difficult. But for us it's the otherway round right? We will try to translate to cpp.
@arunm619
@arunm619 5 күн бұрын
Also, let's make AI our companion here, shall we?
@bishwashkumarsah171
@bishwashkumarsah171 5 күн бұрын
man i do in python still i watch his videos.
@ayaaniqbal3531
@ayaaniqbal3531 5 күн бұрын
If you are having problem with language then you are not ready to solve these problems because for solving we only need to understand the concept and then implement it our language.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 63 МЛН
The IMPOSSIBLE Puzzle..
00:55
Stokes Twins
Рет қаралды 192 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 15 МЛН
Sliding Puzzle - Leetcode 773 - Python
13:24
NeetCodeIO
Рет қаралды 9 М.
2 Years of C++ Programming
8:20
Zyger
Рет қаралды 7 М.
I made a website that makes websites
3:42:45
Harkirat Singh
Рет қаралды 44 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 593 М.
Sliding Puzzle | Leetcode 773
21:31
Techdose
Рет қаралды 2,6 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 63 МЛН