N-queens problem (Backtracking) - Inside code

  Рет қаралды 7,435

Inside code

Inside code

Күн бұрын

Source code: gist.github.co...
🔴 Learn graph theory algorithms: inscod.com/gra...
⚙ Learn dynamic programming: inscod.com/dp_...
💡 Learn to solve popular coding interview problems: inscod.com/50p...
⌛ Learn time and space complexity analysis: inscod.com/com...
🔁 Learn recursion: inscod.com/rec...
NB: This video is ad-free, you can choose to support Inside code by purchasing one of the courses above or dropping a super thanks!
NB2: Discounts of courses above are permanent
I also post content on LinkedIn (inscod.com/lin...) and Instagram (inscod.com/ins...)

Пікірлер: 25
@frogloki882
@frogloki882 Жыл бұрын
So suprised to see that you have only 20k subscribers.The content is too good.
@insidecode
@insidecode Жыл бұрын
Thank you so much 😀
@justusschoenmakers8987
@justusschoenmakers8987 27 минут бұрын
you can speed the process up with symmetry. rotating the board doesnt change if the solution is valid. therefore when youre done checking a square youre also done checking 4 other squares. eg: you start on h8, when the recursion falls back you have also checked for a8, a1, h1. there are no other symmetries because you are litterally filtering them out in the first place, so only speed up by 4. but its really easy to implement.
@ReneeBryant-o1e
@ReneeBryant-o1e Ай бұрын
Garcia Anthony Thompson Elizabeth Brown Steven
@pai.sudhindra
@pai.sudhindra 2 жыл бұрын
💯 🔥 So greatly done in explaining and animation. Thanks 🙌
@insidecode
@insidecode 2 жыл бұрын
You're welcome!
@ParkerLena-q7q
@ParkerLena-q7q 27 күн бұрын
Harris Gary Gonzalez Jeffrey Hall Patricia
@microhacker2411
@microhacker2411 2 жыл бұрын
What tools are used to create animations and simulations? This is great. Keep going! 💖💖❤❤
@insidecode
@insidecode 2 жыл бұрын
Animations with PowerPoint and for the last animation (process when n=5) I made it with Python by generating an image for each state of the board during the process then sticking them to make a video
@microhacker2411
@microhacker2411 2 жыл бұрын
@@insidecode There is a lot of work. Awesome.
@grandparick3176
@grandparick3176 2 жыл бұрын
This is amazing. Specially the visual presentation and how you explained in details.
@insidecode
@insidecode 2 жыл бұрын
Thanks a lot!
@AviPars
@AviPars 2 жыл бұрын
Great programming channel... maybe speed it up 1.25 x and add background music and then you are there
@florinmatei8846
@florinmatei8846 2 жыл бұрын
Alrite, it is time now for me to play again , the smart one. I was imagining some study in the recent past of my unemploied nobody here but I dont know if it really works nor how well, if it does doing anything more like it. Inspired by the Jacobi technique to solve aproximatively for linear eqs systems we might try iteratve , high precisons yet polynomial order complexty, to compute , in the end of the algo running, the whole amount of the number of solutions for some 20 per 20 board for the N-queens problem. But , as a knowing rule on these computers, nothing gets too easy. :-) And the most important, congratulations for Your work here!
@sallaklamhayyen9876
@sallaklamhayyen9876 6 ай бұрын
Brilliant explanation = thank you so much🥰
@mrboyban
@mrboyban 2 жыл бұрын
Couldn't have come at a better time. Follow you on Udemy but didn't find this problem there Many thanks for posting it !
@insidecode
@insidecode 2 жыл бұрын
You're welcome!
@meditationdanny701
@meditationdanny701 2 жыл бұрын
In the case 1 the complexity should be nPr not nCr as we need to arrange n queens on n^2 space
@insidecode
@insidecode 2 жыл бұрын
But the order of queens doesn't matter
@posi0504
@posi0504 10 ай бұрын
your videos deserve more views
@LucaS-ri3zq
@LucaS-ri3zq 2 жыл бұрын
bro thank you for this amazing video
@insidecode
@insidecode 2 жыл бұрын
You're welcome!
@balaeinstein8710
@balaeinstein8710 2 жыл бұрын
great animation . Thank you
@insidecode
@insidecode 2 жыл бұрын
You're welcome!
L14. N-Queens | Leetcode Hard | Backtracking
36:55
take U forward
Рет қаралды 409 М.
The N Queens Problem using Backtracking/Recursion - Explained
14:29
Back To Back SWE
Рет қаралды 136 М.
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 3,9 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 22 МЛН
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
Solving the N-Queens Problem - The Easiest Algorithm
12:25
OttoBotCode
Рет қаралды 8 М.
N-Queens - Backtracking - Leetcode 51 - Python
17:51
NeetCode
Рет қаралды 168 М.
Puzzle 5: Keep Those Queens Apart
52:44
MIT OpenCourseWare
Рет қаралды 15 М.
Knuth-Morris-Pratt algorithm (KMP) - Inside code
22:01
Inside code
Рет қаралды 20 М.
Backtracking (Think Like a Programmer)
13:02
V. Anton Spraul
Рет қаралды 330 М.
6.1 N Queens Problem using Backtracking
13:41
Abdul Bari
Рет қаралды 2 МЛН
The Boundary of Computation
12:59
Mutual Information
Рет қаралды 1 МЛН
N-Queens, N-Knights, Sudoku Solver (LeetCode) - Backtracking Questions
1:19:26
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 3,9 МЛН