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.
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 !!
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.
@@gunasekarb3100 Idk about that😅, but divided the whole patter into 4 parts & designed the parts & framed them one by one(basically the brute force approach u could say)
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
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
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
So it doesn't matter even if the space is not decremented for [ space = 2*(n-i) ] #Pattern_12 //{ Driver Code Starts #include using namespace std; // } Driver Code Ends class Solution { public: void printTriangle(int n) { // code here for(int i=1;i
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.
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 !!!
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
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 < n; i++) { for(char ch = 'A' + (n - i - 1); ch < 'A' + n; ch++) { cout
I think there is no need to print spaces after printing star. Spaces before stars are must to print but not after ones. If i am wrong please correct me.
I would like to give another solution for pattern 17 in below , because sorry to say sir ur alphabetical logic is little bit complex. i just have easy solution for this. for(int i = 0;i
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.
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 ❤❤❤❤❤❤❤❤❤❤
In Pattern 22, if someone is coding in c language, there is no min() function so it can be written like this by creating a function: #include int minimum(int a,int b, int c, int d); int main() { int num=4; int n=2*num-1; for(int i=0;i
42:18 Make an eye import java.util.*; public class Main { public static void main(String[] args) { //System.out.println("Hello, World!"); method13(5); } public static void method13(int n) { for (int i = 1; i < 5; i++) { // stars for (int j = 1; j
Pattern 18 solution wont work for input other than 5, a more dynamic approach is better tried to do so @takeUforward void pattern18(int n) { for(int i=0;i
I'm having some trouble, please help. At the top of the playlist, it shows 5/283. But when I scroll down, I only see 204 videos in the playlist. It's still a lot and I'm very very grateful for the content, but just wanted to confirm if others are also seeing 204 videos only.
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 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 < n; i++) { for (char c = (char) (initial - i); c
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
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 @mehtabmulltani3194
I didn't get formulas by myself untill you reveal the formula for the pattern.Is this common for all or I am one who didn't find out the formula by myself😪
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.
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 ?
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
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
i did pattern 19 myself by running 6 for loops and without seeing strivers explanation based on previous patterns knowledge , it took me 2 hrs to first draw it on book and break it into smaller chunks and then write code, row number is the game changer in second half rhombus
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 .
This is the approach i went with pattern 19(i think striver might had mistakenly written 2n-2 for the second loop of spaces,but here u go)-#include using namespace std; void print1(int n) { for(int i=0;i=i;k--) {cout
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
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..
❤️
competitive programming content plz sir how to reach candidate master i was stucked on specialist
Thank you dada love from Kolkata
STL next?
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.
❤
Thanks a lot it really helped me
nice one thanks for sharing
thanks for sharing that did change my way of thinking somewhat
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 !!
did you solve them by your own or first watched ,then, practice them ....
@@FRACTALUMAR i first watched whole video once, then i solved most of the problems on my own, if needed i came back to video.
Is anyone doing it using Java?
Me
yes
Ofc
Ofc😊
Yeah bro
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.
Same stry wish the best
All the best to you😁
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?
@@known878 ha bhai intermediate level ka almost complete hai . Strive ki AtoZ sheet se padha hai maine usme se question bnao shi rhega
placement lg gyi?
for pattern 15 even more simpler code :
void printPattern(int n)
{
int i;
for(i=0;i
last pattern is mind blowing!!! hard to get that logic at first sight.
UNDERSTOOD
👍
👍👍
👍👍👍
👍👍👍👍
👍👍👍👍👍
haha smart!
let n=5
for (let i=0;i
In Pattern18, we should not hardcode the value 'E', It should be dynamic.
void pattern_18(int n) {
for (int i=0; i
Exactly
Yes bro u are 👍
He could have use
Char ch= 64+n
its wrong bro...The correct solution is....
for(int i=0;i
we can use this for coding ninjas practice
for (int i = 1; i ='A'+(n-i); ch--) {
System.out.print(ch+" ");
}
System.out.println();
}
31:00 What if we don't print the last space ? Like, After the stars. Does it improve TC(Time Complexity)?
whoever found the logic for the pattern 22 must be an alien.
🤣
I did found the logic myself(different but same answer though) but the logic used here is damn crazy🥲
@@LUchiha-dt6xv did you use spiral way?
@@gunasekarb3100 Idk about that😅, but divided the whole patter into 4 parts & designed the parts & framed them one by one(basically the brute force approach u could say)
@@LUchiha-dt6xv you can also try using chebyshev distance for each (i,j) from the middle-most index
how to make formulas I find out to be difficult
Bhai PTA chla
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
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
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
Thankyou 🙏🏻 added
@@takeUforward where r u bro, new lectures 🤔🤔😭😭
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.
for code 14 we can also try :🙂
for(int i=1;i
I literally did the same... because there was error that character can not add with int..so i did with your method
@@dllychoudhary7586 You can use
cout
@@dllychoudhary7586 I am facing the same error in question 16 . What should I do?
@@TiyaBhatt4-de8sq
char ch='A';
for(int i=1; i
Hey can someone tell me can I follow this dsa course before learning OOPs concepts in java?
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
So it doesn't matter even if the space is not decremented for [ space = 2*(n-i) ]
#Pattern_12
//{ Driver Code Starts
#include
using namespace std;
// } Driver Code Ends
class Solution {
public:
void printTriangle(int n) {
// code here
for(int i=1;i
Yeah bro I did the same thing 👍👍
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.
fr
no doubt striver bhaiya has made this playlist the best way.
Thank you Striver! I really love your videos. Small suggestion: you could have calculated time and space complexity for all the patterns.
I think most of them took O(n^2)
Hey Raj, for pattern 11 we can try this code as well which is simpler
void print11(int n)
{
for (int i = 1; i
Can simplify even further
void print11(int n)
{
for (int i = 1; i
@@sagarshah5341 kaise bhai? same hi hai dono me, n square hai dono me
@@blockyquasar I do not remember why I said that!
22 is hard ,,, if anybody can explain the logic pls explain it
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 !!!
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
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.
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 < n; i++) {
for(char ch = 'A' + (n - i - 1); ch < 'A' + n; ch++) {
cout
Yes, Ankush I also noticed this. Using this approach makes it dynamic for all inputs of 'n'. Good Job
I think there is no need to print spaces after printing star. Spaces before stars are must to print but not after ones.
If i am wrong please correct me.
yaah, but if instead of space other symbols or char is there then u should know this method
Revision done😄
hello paji koi dc ya linkedin profile wagera
PATTERN NO.10 can also be solved by symmetry as:
#include
using namespace std;
void dad(int a){
for(int i=0;i
For pattern 7, why print spaces after astrix?
Simply cout
Who else is watching in 2024
Literally, breaking whole concepts into 3 steps really really help me as beginner to understand patterns. Thankyou striver b :)
I would like to give another solution for pattern 17 in below , because sorry to say sir ur alphabetical logic is little bit complex.
i just have easy solution for this.
for(int i = 0;i
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.
Good observation
Another way for Pattern11
for (int i = 1; i
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 ❤❤❤❤❤❤❤❤❤❤
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
@@zenmonk29 So what, Multiple people have under the same name.
In Pattern 22, if someone is coding in c language, there is no min() function so it can be written like this by creating a function:
#include
int minimum(int a,int b, int c, int d);
int main()
{
int num=4;
int n=2*num-1;
for(int i=0;i
If possible can you tell us another method for pattern 22? I did not understand. BTW THANKS A LOT BHAIYA
import java.util.*;
class Pattern
{
public static void main(String args[])
{
int n=7;
int c=((n+1)/2);
for(int i=0;i
📍For beginners
Use "int row" instead of i and "int column" instead of j
Hope it heLps❤
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)
void printPattern(int n)
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j
@@satyam-seth thankss.. i was having a bad time because of this
42:18 Make an eye
import java.util.*;
public class Main {
public static void main(String[] args) {
//System.out.println("Hello, World!");
method13(5);
}
public static void method13(int n) {
for (int i = 1; i < 5; i++) {
// stars
for (int j = 1; j
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.😊😊
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.
frankkly saying this is nnot so much important for interview preparation !!!!!!!!!!!!!!
New exciting videos in new year... Thanks Striver Bhaiya.... Love from Jalpaiguri
Understood..Great way of teaching
Hey Striver, for the pattern 18, I guess the code will not work for n > 5, it will start printing characters lesser than 'A'.
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
The correct solution for pattern 18 is :
class Solution {
void printTriangle(int n) {
for(int i=1;i
Really amazing teaching after listening 8th to 11th pattern , without any error i do 12th by my own❤❤❤
Pattern 18 solution wont work for input other than 5, a more dynamic approach is better
tried to do so @takeUforward
void pattern18(int n)
{
for(int i=0;i
Similar solution is present in take you forward website
Done these all max by my own... feels confident enough to go ahead!! TQ Bhai!!😇
I'm having some trouble, please help. At the top of the playlist, it shows 5/283. But when I scroll down, I only see 204 videos in the playlist. It's still a lot and I'm very very grateful for the content, but just wanted to confirm if others are also seeing 204 videos only.
yes bro, 204 videos are only visible, maybe the other videos are removed or made private
Thank You, we are all hooked up. This is gonna be a Great Series.
I am finding it difficult to derive the relation which is being used as the logic, can someone please explain
A little catch for Pattern-7. Don't need to print last spaces. Just 2 inner for loops will work.
Patern 5 alternate approach
void seeding(int n) {
for(int i=1; i= i ; j- -){
cout
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. 🙌
Pattern 10 simple code
for (int i = 1; i n/2)
{
break;
}
for (int j = 0; j< i; j++)
{
cout 0; k--)
{
cout
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 < n; i++) {
for (char c = (char) (initial - i); c
I was looking for this!!!
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="")
pattern 12 :
can i use this formula for the spaces?? 2*n-2. If not, why??
|
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
thanks dude!! i thought y im not getting it, and u coreected me
!! For pattern 11 try this,,
for(int i=0;i
thanks for the hardwork man i completely understood pattern now
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
@mehtabmulltani3194
I didn't get formulas by myself untill you reveal the formula for the pattern.Is this common for all or I am one who didn't find out the formula by myself😪
do these pattern after 1 week do this after 2 weeks youll get all formulas by yourselft i coudnt do at my first also
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
here's my version of pattern 10, 11:
void pattern10(short len){
if (len%2==0){
for (short i=1; i
The best video on solving patterns on RUclips! Can't thank you enough!!!😀😀
We can solve pattern 11 by this another method
for(int i=1;i
Thank you for this logic-building lecture. I'm feeling confident about pattern questions.
In pattern 7 third loop is use less , it prints in the same place of the first loop
not after the stars
Pls Check it
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.
Same. From outermost square to the innermost square. I did it like this.
can u share your method?
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 ?
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
pattern 8 alternative code
for (int i = 0; i < n; i++)
{
for(int j = 0; j < i; j++){
cout
one of the best videos 🔥
bhai poori to dekh le pehle
@@GauravThinks xd
Figuring out last pattern might be hard😶
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
This is wrong bro
i did pattern 19 myself by running 6 for loops and without seeing strivers explanation based on previous patterns knowledge , it took me 2 hrs to first draw it on book and break it into smaller chunks and then write code, row number is the game changer in second half rhombus
My pattern 10 code:-
void nStarTriangle(int n) {
// Write your code here.
for(int i=0;i
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 .
Which year?
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
Understood! Super amazing explanation as always, thank you very much!!
for gfg 18 pattern another type
void printTriangle(int n) {
for(int i = 0 ; i < n ; i++){
int alpha = 26 - n;
char ch = 'Z' - alpha;
for(int j = 0 ; j
Is this series also covered c++ or only DSA??
pattern 19 is wrong in the lower part the spaces should not be hardcoded 8 it should be variable
he corrected it while teaching pattern 20 . sorry guys
Took 3hrs to do last pattern of my own, totally worth it 😢😊😂
thank you for this video, i think i need a lot of practice with patterns but this was good to get a basic idea.
BRO GUD TUTOR FOR DSA AND AS WELL AS FOR C++.....
WE NEED MORE UPDATEZ LIKE THIX AND THANKS FOR YOUR LECTURE BRO
This is the approach i went with pattern 19(i think striver might had mistakenly written 2n-2 for the second loop of spaces,but here u go)-#include
using namespace std;
void print1(int n)
{ for(int i=0;i=i;k--)
{cout
📌Pinned by take U forward
//Pattern 18 Solution
void alphaTriangle(int n) {
for(int i=0; i
pattern 16:-
#include
using namespace std;
int main(){
int count = 5;
char num = 'A';
num--;
for (int i = 0; i
Very much thank you sir❤❤❤❤
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
The stars pattern-09 is different to the GFG problem.
Your pattern is:
*
***
*****
*******
*********
*********
*******
*****
***
*
GFG Pattern is:
*
* *
* * *
* * * *
* * * * *
* * * * *
* * * *
* * *
* *
*
So Please give some solution for GFG pattern 🙏🙏🙏🙏
Please give response if anyone knows
class Solution {
public:
void printDiamond(int n) {
//first half of printing the diamond patterm that is triangle
for (int i = 1; i
@@Babuchak_Ji Thank you so much 💟
@@go2tech8619 Happy Coding :)
Pattern 11 can also be written using a matrix like concept
under the inner loop
if((i+j)%2 == 0)
cout
problem no 18 can be solved by:
for(int i=1;i
Problem no. 18 code-
void alphaTriangle(int n) {
for(int i=0;i
A better solution for pattern 22:
void printSquare(int n) {
int temp;
for(int i=1; i
Thanks this helped!