Create Sudoku Solver with Python in 20 minutes

preview_player
Показать описание
Support the channel via the links below:

The goal of this tutorial is to explain step by step how a Sudoku solver is created with Python and what the logic behind each step is.

Рекомендации по теме
Комментарии
Автор

Bro I've been wanting to do one of these projects to add to my resume, and I've watched a bunch of videos on the same topic. Yours is the clearest, most detailed, best video I've found. You explain every detail, take us step-by-step, is logical and not boring. Others type the same code but idk what they're saying. Thank you so much for your video. You explain perfectly // division to isolate the squares, you explain perfectly the column[i] to check row, column etc. It's perfect, thank you so much. You explain things very well.

bluegodofspeed
Автор

absolute legend if you are unsure to watch this video or another one then watch this one 100% best explanation ever

alitoto
Автор

Very elegantly solved! - I once wrote a solver myself, wrote much more code and did only find one solution. Excellent!

reiherentenorbert
Автор

this is super intuitive, we are solving a sudoku program at uni and ours is so much more complicated

josecarrera
Автор

That's the most clear explanation i have found ❤

MEEA
Автор

Very nice explanation. It doesn't matter in this case, but as a FYI, // division does not round down. It truncates the remainders and only returns the integer part of the result. Knowing the difference would be important for a technical interview or a case where you were asked about Python knowledge/workings.

randyfriend
Автор

Recursion is so damn scary and brilliant at the same time. I can only hope to master this thinking style.

parkuuu
Автор

Bro, you explain this logic clearly thank you so much and keep growing

rajat
Автор

What a precise and clear explanation !!! Thanks a ton !!

raveenachakrapani
Автор

I ran your code and added lots of print statements to understand where the code backtracks. It is the embedded solve() call which backtracks to the last known good row, column and then increments the counter by one (1).

goutvols
Автор

Tysm!
This project was short and easy to understand and clear.
you just got an extra like!

ChessQuickies
Автор

may use set difference to reduce some codes. eg {1, 2, 3, 4, 5, 6, 7, 8, 9} - set of numbers at that row - set of numbers at that column - set of numbers at that block = only possible numbers at that position. Some people even put those numbers in one byte to perform bitwise operations ^ &.

zerozeronine
Автор

bro thanks for helping for my project. apart all of that you helped me to understand

paytakbaba
Автор

it was clear cut explanation, keep posting videos

clouddrive
Автор

very well explained. Thank you so much

pranavkochhar
Автор

very good explaination. but i don't understand only one thing: how can writing "grid[row][column]" = 0 after solve() help if it doesn't find any solution?

carlocirillo
Автор

Very good explanation ! Thank you. How we can give 'number' as user input and it will check with conditions ?

saransp
Автор

For me this code prints original(unsolved) grid only, Could someone help me please?

ashishzarekar
Автор

lo mejor que eh visto .. saludos de colombia

williamgarrido
Автор

Very nice solution. I have two questions:
1) Where does the control go back to the previous cell when no number is possible for the current [row][column]?
2) How does it find other solutions? i don´t undestand how it does that after the input statement.

JoseMBrito-iuhg
join shbcf.ru