Let's make a sudoku solver in 5 minutes (Backtracking) - Inside code

  Рет қаралды 55,562

Inside code

Inside code

Күн бұрын

Пікірлер: 53
@insidecode
@insidecode Жыл бұрын
Discover the new graph theory algorithms course: inscod.com/graphalgo 🔴 / \ 🔵-🔴 | | 🔴-🔵
@leoelicos
@leoelicos 2 жыл бұрын
The video was easy to follow and the bit at the end was nice to see the function working step by step to show the concept of backtracking. You definitely worked super hard on this video. well done
@insidecode
@insidecode 2 жыл бұрын
Thanks a lot!
@felixboachieyiadom4457
@felixboachieyiadom4457 2 жыл бұрын
it makes me so sad to see a lot of people havent viewed this masterpiece
@mustafaalan584
@mustafaalan584 8 ай бұрын
It was the best video that I watched about sudoku solution and backtracking! It was very clear and simple to understand. Thank you !
@josiahdavid7735
@josiahdavid7735 2 жыл бұрын
He solves every coding problem flawlessly and he's so easy to follow.
@insidecode
@insidecode 2 жыл бұрын
Thanks a lot!
@kavindrachetna
@kavindrachetna 2 жыл бұрын
Great minimal coding using recursion. And animation is real added bonus. The video itself is a good example in its own class to emulate by other educators perhaps.
@insidecode
@insidecode 2 жыл бұрын
Thank you!
@prawnydagrate
@prawnydagrate 5 ай бұрын
WOW. I always expected making a Sudoku solver to be insanely complicated, but clearly not. I actually suck at solving Sudokus, but I'm planning on making a Sudoku solver for a school project, and this is perfect. I didn't expect to understand anything at all when I clicked on this video. I'm really surprised how easy this seems. I hope it is how it seems 🤞
@RA-eg8tw
@RA-eg8tw 5 ай бұрын
This was amazing! I actually understood the sudoku backtracking algorithm finally.
@jasonzhang1133
@jasonzhang1133 2 жыл бұрын
Very cool animation, very elegant solution! Thank you so much.
@insidecode
@insidecode 2 жыл бұрын
You're welcome!
@TrầnThiênAnNguyễn-l4i
@TrầnThiênAnNguyễn-l4i 8 ай бұрын
the best of the best for sudoku solution. THANK YOU SO MUCH😍
@SurgiYT
@SurgiYT Жыл бұрын
it didn't work for me
@cat47
@cat47 Жыл бұрын
how did it not work?
@srx2106
@srx2106 10 ай бұрын
leetcode has the numbers in the board as strings and has "." instead of 0. Switch it around and should work fine
@mrmarmoure5204
@mrmarmoure5204 2 жыл бұрын
الله يبارك the animation is really cool and the code is neat keep it up man you are doing wonders
@insidecode
@insidecode 2 жыл бұрын
Thanks!
@يحيىعلي-ف4غ
@يحيىعلي-ف4غ 9 ай бұрын
بسألك البرنامج الي استخدمه جافا و لا بايثون
@florinmatei8846
@florinmatei8846 2 жыл бұрын
I enjoied very much watching the video. I think that some other solution type, may try breath first strategy, and also, simply to complex coroborating techniques to produce the next breath first aproximation of all pissiblities for any cell to be filled with digits, that is also meant to find, in the end, the unique solution, if the algo work properly. :-)
@florinmatei8846
@florinmatei8846 2 жыл бұрын
Sorry for my english language mistakes, first, and second, yes, my idea that I put above may need more memory than the one occupied by the sudoku array itself, kinda bigger order complexity mem amount needed, compared to the sudoku board. >
@akaskmsskssk6927
@akaskmsskssk6927 2 жыл бұрын
thank you for this video, great timing
@sallaklamhayyen9876
@sallaklamhayyen9876 7 ай бұрын
brilliant explanation => thank you so much Bro😘 please continue
@fantomwolf1841
@fantomwolf1841 7 ай бұрын
I get how the conditions n i get how it checks every number to see if its valid but i still dont get how it goes back can anyone help me out
@moshiurrahman52
@moshiurrahman52 Жыл бұрын
amazing explanation and animation! thanks man
@X_x_kingfisher_x_X
@X_x_kingfisher_x_X Жыл бұрын
How to know if the grid has more than one solution?
@Scratch3.0Tutorials
@Scratch3.0Tutorials Жыл бұрын
If the solver stops when the row is = 9 then how will you do the last row?
@insidecode
@insidecode Жыл бұрын
Indices in Python lists start from 0 so last row's index is 8
@florinmatei8846
@florinmatei8846 2 жыл бұрын
I always wondered if we can succesfully test some rating 1400 chess program based on limited hardware processing power and some software idea that I would formulate it as progressive complexity breath first alpha beta prunning also stable kinda search/ stable first minimax search, breifly. Thank You! :-)
@florinmatei8846
@florinmatei8846 2 жыл бұрын
the key word and the most hard to be acheived is perhaps the "stable" one.
@moeinkpr9100
@moeinkpr9100 Жыл бұрын
your source code in github is follow 'backtraking' algorithm?
@insidecode
@insidecode Жыл бұрын
yes
@smackastan5697
@smackastan5697 2 жыл бұрын
Great quality.
@insidecode
@insidecode 2 жыл бұрын
Thanks
@duncancamilleri8614
@duncancamilleri8614 6 ай бұрын
I found myself spending days on this - it feels so disappointing! Is this normal?? I got to try solve it(did not finish) in a longer approach too, probably inefficient - i feel defeated! I did not use backtracking. I seem to get confused with recursion every time despite having lots of experience! Is this normal? Is it possible to come up with this solution from the get go in 5 minutes if one has never done it before? Thank you for sharing this video - it's been very well explained - + 1 like and subscribe.
@devanshbhardwaj2578
@devanshbhardwaj2578 Жыл бұрын
how do i make my output show all its trials and errors like at 5:05
@أملجغدمي-ج4م
@أملجغدمي-ج4م 9 ай бұрын
Python or Java?
@Souls-iq8to
@Souls-iq8to Жыл бұрын
I love you! no homo. Best explanation I have ever seen. It allowed me to organize my thoughts. Other instructors make it more complicated than what it is.
@user-sj6og7wi2q
@user-sj6og7wi2q Ай бұрын
FINALLY I SOLVED THIS SHI
@sidheshwartiwari9834
@sidheshwartiwari9834 2 жыл бұрын
Thank you.
@insidecode
@insidecode 2 жыл бұрын
You're welcome!
@X_x_kingfisher_x_X
@X_x_kingfisher_x_X Жыл бұрын
But if we return only true how to get the result? How to grab the puzzle?
@insidecode
@insidecode Жыл бұрын
Changes are being done on the grid passed as argument, so you will find the final result there
@X_x_kingfisher_x_X
@X_x_kingfisher_x_X Жыл бұрын
@@insidecode Thanks but if the grid is printed after the function is called grid is still the same unsolved one, but if printed with in the function just before returning False solved one is printed, so how to use the result?
@objective_psychology
@objective_psychology 2 жыл бұрын
This seems like it would take forever to run
@insidecode
@insidecode 2 жыл бұрын
Nope because a sudoku grid is only 9x9, which is quite small
@High_Priest_Jonko
@High_Priest_Jonko 2 жыл бұрын
For a human, yeah probably
@orion_gcn5876
@orion_gcn5876 Күн бұрын
java pls
@6orram
@6orram 2 ай бұрын
i make it with C
@AjithKumaR-jw9wt
@AjithKumaR-jw9wt 2 жыл бұрын
5:05
@2casandeepsaran388
@2casandeepsaran388 6 ай бұрын
My dear you tuber , First solve sudoku in paper and tell about algorithm for program THE ALGORITHM WILL NOT WORK #error
@AjithKumaR-jw9wt
@AjithKumaR-jw9wt 2 жыл бұрын
5:07
RANDOM numbers can approximate pi? - Inside code
5:33
Inside code
Рет қаралды 4,6 М.
Python Sudoku Solver - Computerphile
10:53
Computerphile
Рет қаралды 1,2 МЛН
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 3 МЛН
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,6 МЛН
Sudoku Solver in Python (using 10 different solving strategies)
18:22
Games Computers Play
Рет қаралды 37 М.
Backtracking (Think Like a Programmer)
13:02
V. Anton Spraul
Рет қаралды 341 М.
A Sudoku Secret to Blow Your Mind - Numberphile
6:08
Numberphile
Рет қаралды 2 МЛН
Create a Sudoku Solver In Java In 20 Minutes - Full Tutorial
20:25
Coding with John
Рет қаралды 325 М.
N-queens problem (Backtracking) - Inside code
14:13
Inside code
Рет қаралды 8 М.
L15. Sudoko Solver | Backtracking
26:10
take U forward
Рет қаралды 288 М.
Coding a Sudoku solver in Python using recursion/backtracking
15:02
Someone improved my code by 40,832,277,770%
28:47
Stand-up Maths
Рет қаралды 2,6 МЛН
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 3 МЛН