N Queen Problem | Backtracking | GeeksforGeeks

preview_player
Показать описание

Soundtrack: Moonlight Sonata by Beethovan

This video is contributed by Ishant Periwal

Please Like, Comment and Share the Video among your friends.

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

first i was thinking how to understand this N-queen problem but now i am thinking that i should take a nap and listen to this soothing background music

kushagrajaiswal
Автор

Damn, that moonlight sonata in the background....amazing

BigBrainCoding
Автор

i feel like i am in a date with my gf not learning an algorithm xD

Tashlif
Автор

The best way to explain the problem. Great job with the graphical explanation and the music was just icing on the cake. Well Done !!!

thedeependpsycho
Автор

Of all similar channels, GfG is killing it by creating such easy to understand graphical visualizations! Keep it up guys, you're doing a great service to students :)

AayushSoni
Автор

Thank you for this great visual representation of this problem. It has been a massive help to me understanding this algorithm.

ralphfi
Автор

This is how tutorials should be made...thanks GeekForGeeks you are a saviour

abhishekmaurya
Автор

it is nice to explain a problem visually. Great job !

rianhasiando
Автор

0:43, it was redundant to say "and also one queen in each column", because they would mutually attack each other.

MrAbrazildo
Автор

There are n columns and for each column, we have n decisions to make, hence time complexity becomes n^n. But we can observe that
1st column can be filled in: n ways
2nd column can be filled in: n-1 ways
3rd column can be filled in: n-2 ways
.
.
the nth column can be filled in: 1 way

Hence, the total no. of ways = n!
Now the problem is reduced to checking whether each permutation is valid or not.
Hence T(n) = n*n!

heroicrhythms
Автор

please give solution of this
In the "Four-Queens Puzzle", you are given a 4x4 chessboard and the goal is to place four queens on the
board such that no queen can capture any other queen. That is, only one queen can be on any row, column, or diagonal of the array. Placing one queen anywhere on the array is the only operator and has cost 1.Answer "Yes" or "No" as to whether h(n) = 3 · depth(n), where depth(n) is the depth of node n in the
search tree, is an admissible heuristic. Please explain.

SandyRocks
Автор

Time code 00:56. It says: "This function returns the possible arrangement of the queens for column col to N of the board[N][N]...". Shouldn't it be "for column col to N-1"?

OlivierZetlers
Автор

initially I thought 5 minutes would be less for explanation. I am happy to be proven wrong!!

akashshivshukla
Автор

Wow man! You really made N Queens problem real dramatic!

Waliul_The_Wall-E
Автор

Great job. completely understood with this depiction!

adilsaju
Автор

Visual moves of chess makes it easy to understand. Good work.

devendratapdia
Автор

awesome video
what else can u expect from a video

pulkitgupta
Автор

This is so beautifully explained.. looking for more such videos with animation. Thanks alot.

chetanmore
Автор

I wish this video was made 2 months before. But still the explanation is good.

nishitbose
Автор

now that's what i called a proper tutorial

mirsahib