Solve any Pattern Question - Trick Explained | 22 Patterns in 1 Shot | Strivers A2Z DSA Course
Full Course: takeuforward.org/strivers-a2z...
Notes C++/Java/Codes: takeuforward.org/strivers-a2z...
Practice the patterns here:
Pattern1: bit.ly/3QfK2k3
Pattern2: bit.ly/3VADLAt
Pattern3: bit.ly/3CiWV74
Pattern4: bit.ly/3Gzv70S
Pattern5: bit.ly/3WXGSDD
Pattern6: bit.ly/3i06XDu
Pattern7: bit.ly/3GzvAAa
Pattern8: bit.ly/3IqmG9k
Pattern9: bit.ly/3GyUIHp
Pattern10: bit.ly/3WZoytT
Pattern11: bit.ly/3WLiUvW
Pattern12: bit.ly/3jDVVnD
Pattern13: bit.ly/3WWQ1wb
Pattern14: bit.ly/3GyWCYs
Pattern15: bit.ly/3X1i8KC
Pattern16: bit.ly/3G9gq3g
Pattern17: bit.ly/3jJ7CcR
Pattern18: bit.ly/3Z3scot
Pattern19: bit.ly/3QfKij1
Pattern20: bit.ly/3G2eCZC
Pattern21: bit.ly/3vBpdpy
Pattern22: bit.ly/3vtRNJJ
In case you are thinking to buy courses, please check below:
Link to get 20% additional Discount at Coding Ninjas: bit.ly/3wE5aHx
You can follow me across social media, all my handles are below:
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
Intro: 0:00
BuildUp Logical Thinking w/ patterns: 0:20
Pattern_01: 1:34
4 Rules for solving patterns: 2:24
Pattern_02: 14:17
Pattern_03: 17:33
Pattern_04: 19:53
Pattern_05: 21:00
Pattern_06: 23:39
Pattern_07: 24:33
Pattern_08: 31:10
Pattern_09: 34:16
Pattern_10: 35:12
Pattern_11: 39:22
Pattern_12: 42:15
Pattern_13: 46:52
Pattern_14: 48:42
Pattern_15: 50:57
Pattern_16: 53:03
Pattern_17: 54:42
Pattern_18: 59:45
Pattern_19: 1:01:28
Pattern_20: 1:06:36
Pattern_21: 1:12:29
Pattern_22: 1:15:41
Request!!: 1:21:17
Пікірлер: 1 100
Let's march ahead, and create an unmatchable DSA course! ❤ Do consider to give us a like, and a subscribe, means a world to us..
@giit85
Жыл бұрын
❤️
@bhanupratapsharma6158
Жыл бұрын
competitive programming content plz sir how to reach candidate master i was stucked on specialist
@tuhindas9777
Жыл бұрын
Thank you dada love from Kolkata
@23cash86
Жыл бұрын
STL next?
@techyouknow8026
Жыл бұрын
Happy new Year , Please Sir upload all the basics lecture within 2 months as I trust you so I can request you please upload frequency maintain , I like all your video after watching it completely, also you are helping others to achieve their new year resolution.
Tip: When you're printing spaces in a pattern, replace the space with any other symbol like this "-", it helps in understanding what we are doing.
@RahulChacko
Жыл бұрын
❤
@jaydeeppatil7936
Жыл бұрын
Thanks a lot it really helped me
@anusha6033
10 ай бұрын
nice one thanks for sharing
@suryasaipalthi
8 ай бұрын
thanks for sharing that did change my way of thinking somewhat
@harshyadav1214
6 ай бұрын
very good approach
I was losing confidence in my DSA skills after being away for so long. This video sharpened my thinking as well as brought back that confidence. Thanks a lot !!
whoever found the logic for the pattern 22 must be an alien.
@winter_hope_
29 күн бұрын
🤣
Intro: 0:00 BuildUp Logical Thinking w/ patterns: 0:20 Pattern_01: 1:34 4 Rules for solving patterns: 2:24 Pattern_02: 14:17 Pattern_03: 17:33 Pattern_04: 19:53 Pattern_05: 21:00 Pattern_06: 23:39 Pattern_07: 24:33 Pattern_08: 31:10 Pattern_09: 34:16 Pattern_10: 35:12 Pattern_11: 39:22 Pattern_12: 42:15 Pattern_13: 46:52 Pattern_14: 48:42 Pattern_15: 50:57 Pattern_16: 53:03 Pattern_17: 54:42 Pattern_18: 59:45 Pattern_19: 1:01:28 Pattern_20: 1:06:36 Pattern_21: 1:12:29 Pattern_22: 1:15:41 Like!!: 1:21:17
@takeUforward
Жыл бұрын
Thankyou 🙏🏻 added
@desimemerrudhra8394
Жыл бұрын
@@takeUforward where r u bro, new lectures 🤔🤔😭😭
In Pattern18, we should not hardcode the value 'E', It should be dynamic. void pattern_18(int n) { for (int i=0; i
@Hades0210
Ай бұрын
Exactly
saw a lot of videos before to understand pattern 22. But never got it. The way you solved it!!! What can I say. We owe you big time brother.
UNDERSTOOD 👍 👍👍 👍👍👍 👍👍👍👍 👍👍👍👍👍
Bhaiya learning DSA from your AtoZ sheet . i am in final year I can't thank you enough for bring light in my dark future..when everyone is saying that "tumse an ho payega "I finally decided that "ab mujhse hi ho payega" thank you bhaiya .and please agle 3 month take intermediate level ka DSA sikha do.
@AryanKumar-qj9ud
Жыл бұрын
Same stry wish the best
@uniquescience7047
Жыл бұрын
All the best to you😁
@known878
Жыл бұрын
Bhai tumne bola ki 3 month takk intermediate DSA sikha do aur tumhare comment ke bhi 3 months ho gaye to sikh liye kya intermediate wala?
@nisha1841
Жыл бұрын
@@known878 ha bhai intermediate level ka almost complete hai . Strive ki AtoZ sheet se padha hai maine usme se question bnao shi rhega
@prajjwal5520
Жыл бұрын
placement lg gyi?
for code 14 we can also try :🙂 for(int i=1;i
@dllychoudhary7586
3 ай бұрын
I literally did the same... because there was error that character can not add with int..so i did with your method
@honourable8816
2 ай бұрын
@@dllychoudhary7586 You can use cout
@TiyaBhatt4-de8sq
2 ай бұрын
@@dllychoudhary7586 I am facing the same error in question 16 . What should I do?
@yashiktaneja673
Ай бұрын
@@TiyaBhatt4-de8sq char ch='A'; for(int i=1; i
last pattern is mind blowing!!! hard to get that logic at first sight.
39:22 tip for pattern 11: if the sum of every single (row+column) is 'even' then have to print 1 else 0 if((i + j) % 2 === 0) print(1) else print(0)
@satyam-seth
4 ай бұрын
void printPattern(int n) { for (int i = 0; i { for (int j = 0; j
@012srishtisaini7
Ай бұрын
@@satyam-seth thankss.. i was having a bad time because of this
Hey Striver. I just discovered you today. Your explanations are great. I'm enjoying your content. But more than that - I love your energy and your enthusiasm! ⚡Thank you!
Thanks for the great content ❤ @tip for the pattern 18 the logic in the video is hardcoded for 'E' letter alone . Kindly utilize the below solution. void alphaTriangle(int n) { for(int i=0;i
Thank You, we are all hooked up. This is gonna be a Great Series.
Literally, breaking whole concepts into 3 steps really really help me as beginner to understand patterns. Thankyou striver b :)
The best video on solving patterns on KZread! Can't thank you enough!!!😀😀
HAPPY NEW YEAR SIR HAVE A GREAT YEAR AHEAD AND WE ARE VERY GLAD TO GET THE HELPING PERSON LIKE YOU FOR BEGINERS LIKE US.
Thank you for this logic-building lecture. I'm feeling confident about pattern questions.
you are an inspiration for programming faternity! loved the way you teach. The ease with which you have taught recursion and dp is commendable. i get to learn every day from you. Thank you for being light in lives of programmers.
@raunak276
Жыл бұрын
fr
@sainaid
9 ай бұрын
no doubt striver bhaiya has made this playlist the best way.
striver i think you made a little mistake in pattern18 your considering j as E, but the start letter depends on number of rows, therefore the code will work for more test cases void pattern18(int n){ for (int i = 1; i
New exciting videos in new year... Thanks Striver Bhaiya.... Love from Jalpaiguri
The last pattern took me some time but I just figured it out and i'm so happy 🧠🤯. Such a great feeling😊. Thank you Striver for this amazing content.
It doesnot come interviews i agree. But still i would urge all to do this exercise... It will help all Software engineers or aspirants to improve their problem solving skills by seeing patterns
Hey Striver, i think for the pattern 18, we should not directly start from 'E', I think according to pattern we should be starting form ('A' + n - i + 1) until ('A' + n), for(int i = 0; i for(char ch = 'A' + (n - i - 1); ch cout
@shaharslan3372
10 ай бұрын
Yes, Ankush I also noticed this. Using this approach makes it dynamic for all inputs of 'n'. Good Job
Absolutely loved the video..the way you explained it made it very easy to understand complicated problems
The logic for last one is something out of the box, great work man!!
Nice explanation sir! Just wanna give a general code for Pattern 18. void pattern18(int n){ char ch= 'A'+n-1; for(int i=0; i
Understood! Super amazing explanation as always, thank you very much!!
very valuable course bhaiya ...no one in the entire youtube has explain the DSA like you ...the way you explain 😍
The last one patttern is so tricky. Thanks, for the complete tutorial.. Very optimized way you explained to solve pattern of any type in a very easy way. Thankyou Striver.
thanks for the hardwork man i completely understood pattern now
More than the premium course I have learned a lot. The lecture delivery, explanation, and expression are great, and that makes me concentrate more to watch the video. I have done all the problems on my own using your 4 pattern-solving rules. Hats off sir ❤❤❤❤❤❤❤❤❤❤
@zenmonk29
25 күн бұрын
today i lost my phone. it was 19 days old. went to police station to file a report, the inspector had the same name as you
@hasanuzzamananuz8270
15 күн бұрын
@@zenmonk29 So what, Multiple people have under the same name.
Thank you for all your efforts. By reading the comments its obvious how clearly you explain the topic and make us understand. Thank you for that. Do take care of your health as well. 👍
These patterns have helped me a lot to understand the loops. Thank you!!
Thank you Striver! I really love your videos. Small suggestion: you could have calculated time and space complexity for all the patterns.
@sathvikvutukuri9179
Жыл бұрын
I think most of them took O(n^2)
Done these all max by my own... feels confident enough to go ahead!! TQ Bhai!!😇
Really happy to get it all for free! Thank you so much Striver!
UNDERSTOOD......Thank You So Much for this wonderful video..........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
Really amazing teaching after listening 8th to 11th pattern , without any error i do 12th by my own❤❤❤
What will be the frequency of lectures and will you teach the complete DSA in this course? Also what will be the tentative duration of this course? Great lec btw
Thanks sir, its the first time i solved majority patterns by myself after understanding the concept.
Bro u making it look so easy i was stuck in patterns from decades man
Thanks bro, you are giving your best to teach us and i will assure u that i will also give my 100% so that your efforts will not be a vain. I will complete this course and solve your 180 questions so that that i can place in a good company. once again thank u so much for your in depth assistance. 🙌
For pattern number 12 we could also have done the following : int space = 2 * ( n - i )...ofcourse this variable would have to be defined within the scope of the outer loop. Besides, the problem given on the sheet and the problem redirected to by the link are actually slightly different. Here's the code snippet for solving the problem redirected to by the link : void printTriangle(int n) { for(int i = 1; i
@abhisheksantoshbhambe7617
4 ай бұрын
thanks dude!! i thought y im not getting it, and u coreected me
Hey can someone tell me can I follow this dsa course before learning OOPs concepts in java?
Thank you striver bhaiya, you make me believe free content is enough to cracking interviews, keep doing the good work. All the best.
Thank you for the video, If possible could you please share the tasks.json file here, i.e. how you're writing to the output file simultaneously.😊😊
Revision done😄
@mr.batman2348
2 күн бұрын
hello paji koi dc ya linkedin profile wagera
I am not getting correct output for pattern 9 if i combine 7 and 8 ..because the pattern 9 is different from the combined pattern of 7 and 8..could you please check it out and let me know ?
Thank you Striver!, the way you have Taught was good & makes it understand clearly
A little catch for Pattern-7. Don't need to print last spaces. Just 2 inner for loops will work.
For pattern18 if we don't want to hardcode 'E' and use it for other row numbers then we can make small change as char initial = (char) ('A'+ (n-1)); for (int i = 0; i for (char c = (char) (initial - i); c
@NikitaNair
Жыл бұрын
I was looking for this!!!
@anishchhabra6085
6 ай бұрын
Python code for the same: for i in range(n): char = 65 for j in range(i+1): print(chr((n-i-1)+char),end="") char += 1 print(' ',end="")
Awesome sir Very intuitive and thanks for the video❤
Bhut badiya padhta ha bhaiya ap . Dil garden garden ho jata ha.
Hey Raj, for pattern 11 we can try this code as well which is simpler void print11(int n) { for (int i = 1; i
@chethanprabhu4475
Жыл бұрын
Can simplify even further void print11(int n) { for (int i = 1; i
@blockyquasar
Ай бұрын
@@sagarshah5341 kaise bhai? same hi hai dono me, n square hai dono me
@sagarshah5341
Ай бұрын
@@blockyquasar I do not remember why I said that!
Edited : Saw you correct it in the next question :-D For pattern 19 , I don't think we should hard code the number of spaces as 8 and then keep on decreasing the number by 2 with each iteration , as it will only work for input n = 5. Rather there should be a general formula : for(int i = n ; i >=1; i--){ for(int j =1; j
@AdityaVerma-hh1ox
8 ай бұрын
This is wrong bro
Your explanations are great. I'm enjoying your content.✨Thank You
This is the best video for clearing the concepts of loop or pattern , thank you so much for this video❤
Source code ? I have learned Star space star patterns with your trick ❤️🔥. It would be better if you normalize and use loop from 0 or 1 for every problem :) cheers !!!
Is anyone doing it using Java?
@xihadityajaiswal8797
2 ай бұрын
Me
@harikrishnapatel7514
2 ай бұрын
yes
@shaunakmajumdar5278
2 ай бұрын
Ofc
@vikrant3640
2 ай бұрын
Ofc😊
@ProgramerRaj
2 ай бұрын
Yeah bro
Thank you for this content! This video helped a lot! Kindly correct the code for pattern 18 to adapt to different values of input... void print18(int n){ for(int i=1; i
best one shot for patterns:) tysm striver bhaiya
pattern 20 is same as pattern 19 but just interchanging the spaces and stars variables. that means no.of stars in pattern 20 will be same as no.of spaces in pattern 19 and vice-versa.
@takeUforward
Жыл бұрын
Good observation
I done these all 22 pattern in morning. Thank you 💓
@swarupdwivedy5733
Жыл бұрын
Hi bro can you please help me
for gfg 18 pattern another type void printTriangle(int n) { for(int i = 0 ; i int alpha = 26 - n; char ch = 'Z' - alpha; for(int j = 0 ; j
Understood! Can't thank you enough, God bless you for your wonderful contribution to the community
understood striver :) thank very much for this wonderful lecture.
last pattern was awesome. I followed another method and figured out some another pattern and symmetricity in it. But your approach was very informative too.
@darkexodus6404
Жыл бұрын
Same. From outermost square to the innermost square. I did it like this.
Recommended by friend and I feel like your course is the best . Just completed patterns and I still have a long way to go looking forward to be better and to learn a lot . Thanks a lot striver for doing this you are a literal saviour and a GOD send to people like me .
@Ajay.m-sc1vc
9 ай бұрын
Which year?
Understood!! Thanks alot Striver 🔥
Awesome Sir! Its truly insightful and interesting.
one of the best videos 🔥
@GauravThinks
Жыл бұрын
bhai poori to dekh le pehle
@yikes3807
Жыл бұрын
@@GauravThinks xd
If possible can you tell us another method for pattern 22? I did not understand. BTW THANKS A LOT BHAIYA
@user-wp8ph3sx5s
6 ай бұрын
import java.util.*; class Pattern { public static void main(String args[]) { int n=7; int c=((n+1)/2); for(int i=0;i
your explaination is out of this world i am new to cs i found patterns little bit tricky but i will work hard on this
Hey Striver, for the pattern 18, I guess the code will not work for n > 5, it will start printing characters lesser than 'A'.
@varunsde9533
5 ай бұрын
to make it as per any value of n, make the following changes: char ch = (char)((int)'A'+n-i-1); for(int j=0;j
Better solution for Pattern no.12 (using only 2 for loop) : #include using namespace std; int main() { int n = 9; int start = 1; int end = n*2; int temp; for (int row = 1; row
Finally, completed this module of Patterns which I have been neglecting for months now. I really enjoyed learning these tricks. Thank you Striver Bhaiya.
Hey, Can anyone suggest how to organize all the questions one has solved while practicing on multiple coding platforms? I'm thinking of creating a git repo for it.
Thank you so much😍 Your voice was easily understand superb!!! Excellent 👌
Very nice explanation...God Bless You
problem 22 - For Python: I found below approach most optimised. If u observe (row wise): 1st half and 2nd half is a mirror (ignore middle for a while.) 1st half of a row is a combination of two parts: a - fix part b - decremental part for eg , for n = 6 (considering just 1st half of a row) row1 : 666666 -> all fix , no decremental row2 : 655555 -> 6- decremental , 55555 - fix row3 : 654444 -> 65 - dec , 4444 - fix row4 : 654333 -> 654 - dec , 333 - fix derive the code for dec and fix , then combine the string to generate 1st part of a row , then neglet last character and reverse the result , concatenate both original and reverse to get full row. time difference (n = 500 ) 1. n - min() approach : 256ms 2. above approach : 54 ms
Understood. Thanks!
BRO GUD TUTOR FOR DSA AND AS WELL AS FOR C++..... WE NEED MORE UPDATEZ LIKE THIX AND THANKS FOR YOUR LECTURE BRO
Understood , Thank you Striver! 💚
as a beiggner to understand your code qaulity its little bit difficult can i make this pattern on my way or i should practice your methods
believe me I watched the petterns videos earlier from another youtubers too but I myself wasn't able to solve a single pattern but this time this person made me do the complex patterns by my self.He is something different .Hatss off to youu bhaiya
Thanks Striver ! Great job done
hey how to get the input and output screen on the side??
This was a great lecture.... m more confident in patters now
Understood Everything . Your course is amazing !!!!
understood, thanks bro for such a great content.
wow you have created this video in 4K u r just amazing
hello STRIVER BRO, @takeUforward , I am trying to dolve the code in online IDE then it is running but when i am using the coding ninjas platform to run the same code then it is showing errors, :( please help
Really great amazing revisions
Great video specially last pattern is so good for build logic
Sir the pattern was explained in the most most easiest way Earlier i had checked for the pattern but couldn't understand the solution But now i understood it Thank you 💖
Understood very well last pattern is mind blowing. Your are jewel
hey striver!! is that necessary to print spaces in each line after printing the characters or symbols .....??? I think it's not any mandatory ..cause all the test cases were passed !! can u pls clarify my doubt???
understood !! the last pattern was cool