L14. N-Queens | Leetcode Hard | Backtracking

  Рет қаралды 382,354

take U forward

take U forward

3 жыл бұрын

Check our Website:
In case you are thinking to buy courses, please check below:
Link to get 20% additional Discount at Coding Ninjas: bit.ly/3wE5aHx
Code "takeuforward" for 15% off at GFG: practice.geeksforgeeks.org/co...
Code "takeuforward" for 20% off on sys-design: get.interviewready.io?_aff=takeuforward
Crypto, I use the Wazirx app: wazirx.com/invite/xexnpc4u
Take 750 rs free Amazon Stock from me: indmoney.onelink.me/RmHC/idje...
Earn 100 rs by making a Grow Account for investing: app.groww.in/v3cO/8hu879t0
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
---------------------------------------------------------------------------------------------------------------------------------------------------- Pre-Requisites: Recursion Playlist Videos, watch at 1.25x for best experience.
✅Coding Ninjas Discount Link: aff.codingninjas.com/click?o=...
Please Please SUBSKRIIIBEEEEE the new channel: / @striver_79
Problem Link: leetcode.com/problems/n-queens/
C++/Java Code: takeuforward.org/data-structu...
---------------------------------------------------------------------------------------------------------------------------------------------
✅This is where I teach: ----- Use coupon-code "TAKEUFORWARD" for getting 10% on my course at GFG: bit.ly/striver_cpCourse​
✅Use coupon-code "TAKEUFORWARD" for getting 10% for all GFG courses: bit.ly/tuf_gfgCourse​
---------------------------------------------------------------------------------------------------------------------------
If you appreciate the channel's work, you can join the family: bit.ly/joinFamily​
✅Thumbnail Creator: / rikonakhuli
✅ Striver's Linkedin Profile: / ​
✅ Instagram: / ​
✅Connect with us: bit.ly/tuftelegram​ (Use Link in Mobile only, if not works search "takeUforward" in telegram)..
#dsa​ #striver #placements

Пікірлер: 464
@takeUforward
@takeUforward 3 жыл бұрын
Instagram for live updates about channel and live sessions: striver_79
@akshatagarwal8125
@akshatagarwal8125 2 жыл бұрын
Thanks man, really appreciate your efforts
@RahulKumar-yq9ic
@RahulKumar-yq9ic
JAVA guys 🤪
@sahilbani7020
@sahilbani7020 Жыл бұрын
how can i give 100k likes to this video?
@lakeshkumar1252
@lakeshkumar1252 Жыл бұрын
Thanks you so much sir
@nishant3904
@nishant3904 Жыл бұрын
Finding previous Queens in just O(1) time was Amazing, learning so many things in Recursion!
@Codekage1
@Codekage1 Жыл бұрын
Yeah!!!!!!!!!
@bitturanjan9539
@bitturanjan9539 3 жыл бұрын
Take U forward is turu lob ❤️
@codewithakki4559
@codewithakki4559 2 жыл бұрын
Hi striver, for the upper diagonal check we can just use (row-col) as it is similar to the lower diagonal check rather than [(n-1)+(col-row)], Nice explanation though
@prikshit8
@prikshit8 3 жыл бұрын
please please complete this series before July. your content is better than paid content.
@ayush.kumar_02
@ayush.kumar_02 3 жыл бұрын
I'm just searching explanation of n-queens problem and hear is it 😂... thanks striver ❤
@coding8000
@coding8000 2 жыл бұрын
The Explanation is at God Level and Best on Internet, thank you.
@ryuzaki8142
@ryuzaki8142 2 жыл бұрын
Hi Striver,
@noobCoder26
@noobCoder26 3 жыл бұрын
Thanks Striver Vaiyaa for this premium class explaination .
@ferozqureshi5228
@ferozqureshi5228 Жыл бұрын
That’s insane bruh! You explained it like a “Hello, world!” program. I owe you a big one.
@muhammedimdaad
@muhammedimdaad
I was stuck on this one problem for months, because I didn't realize recursion is the choice to solve this problem. However even if I got the intuition of recursion, I might still have never solved this because I wasn't clear about the backtracking. You are a master of teaching, I never knew I would understand this and backtracking isn't as hard as I pictured it.
@cgoxo
@cgoxo 2 жыл бұрын
Ever since I started watching your videos, I always wondered yaar yeh itna achha kaise samjha sakte hai.
@deveshlohumi7671
@deveshlohumi7671 3 жыл бұрын
There is intuition to (n-1+col-row) as well, for every element of any matrix row-col and similarly col-row uniquely identifies the principal diagonal that element belongs to. In the worst case col can be 0 and row n-1 so we get -(n-1) , now this wouldn't be a problem if we were using map data structure but since we are using array we simply add (n-1) to the difference so that it starts from 0 and ends at index n-1+(n-1-0) = 2n-2 which is a total of 2n-1 elements.
@santhoshs7028
@santhoshs7028 Жыл бұрын
Thank you for making the concept clear🤩.
@anupamdubey5736
@anupamdubey5736 2 жыл бұрын
That part where you explained why don't we need the check the placement of the queen was lit. It was a doubt since long time. Thanks for your explanation. ♥
L15. Sudoko Solver | Backtracking
26:10
take U forward
Рет қаралды 256 М.
N-Queens - Backtracking - Leetcode 51 - Python
17:51
NeetCode
Рет қаралды 157 М.
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 26 МЛН
CHOCKY MILK.. 🤣 #shorts
00:20
Savage Vlogs
Рет қаралды 15 МЛН
L19. Rat in A Maze | Backtracking
25:10
take U forward
Рет қаралды 201 М.
How to Solve ANY LeetCode Problem (Step-by-Step)
12:37
Codebagel
Рет қаралды 157 М.
L17. Palindrome Partitioning | Leetcode | Recursion | C++ | Java
24:34
take U forward
Рет қаралды 256 М.
Quick Sort For Beginners | Strivers A2Z DSA Course
35:17
take U forward
Рет қаралды 337 М.
L12. Print all Permutations of a String/Array | Recursion | Approach - 1
19:07
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 114 М.
The N Queens Problem using Backtracking/Recursion - Explained
14:29
Back To Back SWE
Рет қаралды 135 М.
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 26 МЛН