Solve any square or hollow pattern in Java

  Рет қаралды 145,023

Simply Coding

Simply Coding

Күн бұрын

In this video we are going to explain some square patterns, like parallel bars, cross, plus and hollow patterns like hollow square, triangle, hill or diamond.

Пікірлер: 138
@cagla3360
@cagla3360 2 жыл бұрын
never understood patterns until your videos. thank you so much! you saved my life
@mddilnawazalam5306
@mddilnawazalam5306 Жыл бұрын
My first comment ever on youtube. The way you taught is awesome !!!!! very easy to understand
@ecostrium849
@ecostrium849 Жыл бұрын
Thank you.. I was very confused but i m now able to solve problems on my own😄thank you so much.. I was very confused in classes.. But this video help me understand in one go
@AnuragKumarPrajapatii
@AnuragKumarPrajapatii 3 ай бұрын
actually you are underrated but by god every lecture of bigger channels fail in front of this masterpiece. Thanks for making it easy
@crazyjose3535
@crazyjose3535 2 жыл бұрын
Maam many videos are there fr pattern in youtube bt only urs is useful nd understandable Ma'am..thank u so much maam ❤️❤️
@harshitkushwah6920
@harshitkushwah6920 Жыл бұрын
I have never grasp the concepts in such an easy manner.Thanks ma'am 😊😊☺️☺️
@thewindwillcarryus9175
@thewindwillcarryus9175 Жыл бұрын
Why there is j
@Shivakumar-ik3tt
@Shivakumar-ik3tt Жыл бұрын
The amazing and elegant style of teaching.
@ayushrajput812
@ayushrajput812 Жыл бұрын
Best vdo i have ever seen on this concept Great explanation
@prakasherrolla1035
@prakasherrolla1035 Жыл бұрын
Mam u r really a good teacher i never seen ever
@user-pc9gi5ej9x
@user-pc9gi5ej9x 8 ай бұрын
Detail explanation with understandable pictures
@nagrajnateekar8211
@nagrajnateekar8211 2 жыл бұрын
Simply great🙏
@shivbagupta7888
@shivbagupta7888 2 жыл бұрын
excellent explain and every thing standable
@vaaw6408
@vaaw6408 2 жыл бұрын
great teaching method thank you soo much i was confused soo much
@shivbagupta7888
@shivbagupta7888 2 жыл бұрын
Wonderful explain thanks for given your logic 🖤🖤
@pgour637
@pgour637 3 ай бұрын
Thank you so much mam very helpful video i was stucked in patterns now i can solve patterns related to square😊
@bhaskarcherry2196
@bhaskarcherry2196 Жыл бұрын
Ma'am you explained very well 🙏
@waytoawake6394
@waytoawake6394 Жыл бұрын
Thank u mam for ur lovable teaching
@sreehithathatwadi5210
@sreehithathatwadi5210 2 жыл бұрын
This video helped me a lot
@giriprasadp1726
@giriprasadp1726 Жыл бұрын
very excellent explanation madam.Thank you..
@vamsikrishnareddy8085
@vamsikrishnareddy8085 Жыл бұрын
Nice explanation and it is very easily understood.... 😻❤️❤️😘😘 Thank u so much ma'am...🥰🥰 Pls u can do Data Structures Videos...😊😊☺️
@ganeshjaggineni4097
@ganeshjaggineni4097 10 ай бұрын
NICE SUPER EXCELLENT MOTIVATED
@chaitunag1
@chaitunag1 Жыл бұрын
Thank you. Appreciate explaining the concepts so clearly. 🤩🤩🤩
@user-gu4qm7hu8i
@user-gu4qm7hu8i 11 ай бұрын
Thank you....very well explanation
@shandeshchaudhary-ps1tz
@shandeshchaudhary-ps1tz Ай бұрын
I have fallen in love with your explanation.😊💌💌
@gauravchouhan3322
@gauravchouhan3322 Жыл бұрын
thanks mam as you clear my concepts on this topic.
@HeavenRacer422
@HeavenRacer422 Жыл бұрын
best pattern explanation
@hrushikeshmandekar6572
@hrushikeshmandekar6572 Жыл бұрын
For the one who didn't get why we not used i+j == n+1 in hollow triangle and diamond, note that The reasons behind this is that concept i+j will not work here, just forgot that concept, in easy way I will tell you that, in second triangle see from where j is starting in for loop, its j = 1, so j is going to start always from 1 as we move downwards, means j = 1 is the first element for second triangle at each row, so we can say that j = 1 is making the border for second triangle, so that is why we are checking the first element of 2nd triangle every time in if statement that is j == 1 so that whenever it will come, we will create a star, so likewise the border is created for second triangle. In third triangle look what is making border, that's the last element that is when j == i, so that is why we have taken j == i in if statement of third for loop.
@chandrikaobulasetty6944
@chandrikaobulasetty6944 7 ай бұрын
In hollow decreasing triangle why should we took j==n instead of taking j==1 please give me reply and clarify my doubt
@vyshnavks6505
@vyshnavks6505 7 ай бұрын
Mam...firstly i apprciate your time and effect you have dedicated to make video to make our life so easy to understand the concept......man while you explaning hollow increasing triangle there is a distrotion in video no view of anything ........am basiclly from different backgroung of EEE but your explaination about the concept made me so easy i wished like you proffesor was there in colleges all student could have scored out of out and loved there subjects....thank you
@michaelharrington5860
@michaelharrington5860 Жыл бұрын
This video is amazing.
@PuspenduBiswas-jn2mq
@PuspenduBiswas-jn2mq 22 күн бұрын
@SimplyCoding In this video at 7:41 min you have mentioned that to find middle row and column we use the formula n/2+1 but the formula should be (n+1)/2 for odd number and n/2 for even number.
@niteeshyadav8871
@niteeshyadav8871 2 жыл бұрын
Much helpful vedio
@jyothish.m.u
@jyothish.m.u 6 ай бұрын
Very simple 👏👏👏👍👍👍
@satyajitchoudhury7004
@satyajitchoudhury7004 2 жыл бұрын
Tq for making this video 😘
@biswajeetmohanta4945
@biswajeetmohanta4945 Жыл бұрын
Nice explane mam
@striveforperfection18
@striveforperfection18 2 жыл бұрын
Mam please can you also make a DSA playlist🙏🙏...ur teaching way is supebbbb... and simplest...💓🔥
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Thanks, yes we have already done a few DSA videos and we will create a playlist for same. Will also finish the remaining videos as well.
@striveforperfection18
@striveforperfection18 2 жыл бұрын
@@SimplyCoding thankyou so much 🙏
@prashant1470
@prashant1470 Жыл бұрын
@@SimplyCoding where mam ?? Please give us link . I couldn't find
@nibrasmuhammed7106
@nibrasmuhammed7106 2 жыл бұрын
superb!
@muthuvels9558
@muthuvels9558 2 жыл бұрын
mam please include the other pattern videos as a playlist and paste the link in the description. it will help us to saw other problems
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Thanks a lot for your suggestion, will do the same
@DanDan-st5qe
@DanDan-st5qe 2 жыл бұрын
Very helpful
@prashant1470
@prashant1470 Жыл бұрын
Thanks mam . Very very thank you ❤️
@harliepole4862
@harliepole4862 2 жыл бұрын
Thank you very much.
@aswanianoop7616
@aswanianoop7616 Жыл бұрын
❤❤❤❤❤🎉very helpful
@RPLmodelamentos-sz3ox
@RPLmodelamentos-sz3ox 4 ай бұрын
Thank You!!
@ranjithanuslaksh5129
@ranjithanuslaksh5129 Жыл бұрын
For a triangle star int i = what to give
@rudra9535
@rudra9535 2 жыл бұрын
amazing
@crimsonshorts492
@crimsonshorts492 2 жыл бұрын
thank you very much maan 😍😍😍
@TOPSTAR-cy4je
@TOPSTAR-cy4je 2 жыл бұрын
nice teaching mam
@afrahsaleem6199
@afrahsaleem6199 Жыл бұрын
Hi, could u please share the link for hollow butterfly pattern program present on simply coding website🙂
@top5things968
@top5things968 Жыл бұрын
Thank you so much Mam .
@satyajitchoudhury7004
@satyajitchoudhury7004 2 жыл бұрын
Tq so much maam ❤️
@vasugaming8846
@vasugaming8846 10 ай бұрын
super Bro
@aksh8713
@aksh8713 Жыл бұрын
Thank you so much! Pretty mam
@sushiladevirampuria4273
@sushiladevirampuria4273 2 жыл бұрын
In increasing triangle (hollow) can we write j=1,i=n,j=n???? Maam pls tell@SimpleCoding
@SimplyCoding
@SimplyCoding 2 жыл бұрын
I am not sure if I understand your question. Can you edit the code and send at info@simplycoding.in
@TranNguyen-xp4rb
@TranNguyen-xp4rb Жыл бұрын
Thank you so much
@tarekghosn3648
@tarekghosn3648 2 жыл бұрын
this was amazing
@AsifAliyev1988
@AsifAliyev1988 Жыл бұрын
wish you've done it in IDE
@rizajeancobol9924
@rizajeancobol9924 2 жыл бұрын
Thank you very much, ma'am. If it weren't because of you, I wouldn't pass this semester. Thank you very much! You just saved me...
@greyman980
@greyman980 2 жыл бұрын
Thank you
@amanpatel9098
@amanpatel9098 7 ай бұрын
mam your hollow triangle pattern is not working , please look at it once na.. Nd so thankful for this video , very helpful and the way you explain is awesome. i am almost 15 times watched your video nd every time i feel blessful.
@nishanthulwan1478
@nishanthulwan1478 5 ай бұрын
Just one question if you can answer on the last question when you are printing Diagonal why are you doing j == n? it should be i + j == n + 1 right ??
@nishanthulwan1478
@nishanthulwan1478 5 ай бұрын
this is for hollow decreasing traingle
@suyakisaneeshwar8506
@suyakisaneeshwar8506 Жыл бұрын
Super
@sushithabojjam6992
@sushithabojjam6992 Жыл бұрын
Could you paste the code of hollow left Pascal
@makewithmegma
@makewithmegma Жыл бұрын
🔥💕👌👍
@MukeshVerma-fv3ed
@MukeshVerma-fv3ed Жыл бұрын
In hollow hill pattern, in second triangle isn't that a diagonal and we can use the formula (i+j==n+1), then why is the formula j==1?
@tsionasmare8243
@tsionasmare8243 Жыл бұрын
i also agree with u
@hrushikeshmandekar6572
@hrushikeshmandekar6572 Жыл бұрын
The reasons behind this is that concept i+j will not work here, just forgot that concept, in easy way I will tell you that, in second triangle see from where j is starting in for loop, its j = 1, so j is going to start always from 1 as we move downwards, means j = 1 is the first element for second triangle at each row, so we can say that j = 1 is making the border for second triangle, so that is why we are checking the first element of 2nd triangle every time in if statement that is j == 1 so that whenever it will come, we will create a star, so likewise the border is created for second triangle. In third triangle look what is making border, that's the last element that is when j == i, so that is why we have taken j == i in if statement of third for loop.
@susinaren2999
@susinaren2999 19 күн бұрын
❤❤❤
@igu642
@igu642 4 ай бұрын
❤❤
@Akl_Badi_Ya_Bhains
@Akl_Badi_Ya_Bhains 8 ай бұрын
Hi, thank you for such an exceptional video. I have one doubt though. While taking the if-condition for 2nd triangle of Hollow Hill Pattern (at 15:14), we are using the condition "if(i == n || j == 1)." Why are we using j == 1 when I think it should have been j == i. I know you r correct and I am wrong, but I am unable to get it, can u please explain.
@balapaudel
@balapaudel 8 ай бұрын
j==1 helps us print the first star in each row. remember we print one line at a time. j prints stars in each line always starting from 1. And we need the 1st star in each line so j==1. j==i doesn't work because i is responsible for rows. again remember we print one line at a time. for first row j will print a star because i==1 at first row but when we need to print second row the value of i becomes 2 but we need 1st star of each row. So this won't work.
@chandrikaobulasetty6944
@chandrikaobulasetty6944 7 ай бұрын
​@@balapaudeltq for the explanation for the 2nd triangle but why we take j==i in 3rd triangle instead of j==1?
@aravindr8034
@aravindr8034 2 жыл бұрын
😍
@tapadiptobanerjee2284
@tapadiptobanerjee2284 4 ай бұрын
Can you do hollow square pattern without using operator
@rohitmadaan6679
@rohitmadaan6679 Жыл бұрын
thankss
@eekshitasai2663
@eekshitasai2663 Жыл бұрын
Hollow decreasing triangle is it crt or we can write it a if(i=1||j=1||i+j/n+1) I think it is crt code plz reply
@BoobieMistake
@BoobieMistake Жыл бұрын
No, the if condition should be "if (i==1 || j==1 || i+j==(n+1))"
@shreelekham.k.9141
@shreelekham.k.9141 4 ай бұрын
​@@BoobieMistakeyes in video it is incorrect
@Mukthar_vlogs
@Mukthar_vlogs 2 жыл бұрын
thanks
@habeebkinlolu9668
@habeebkinlolu9668 10 ай бұрын
i used almost 4 hours trying to solve this in a coding challenge, i didn't even watch this video finish before i understand
@Seraph-21_
@Seraph-21_ 9 ай бұрын
do it again with python pls
@MSPHOTOGRAPHY-ep8by
@MSPHOTOGRAPHY-ep8by Жыл бұрын
In Hollow diamond pattern j
@vishalkamble3646
@vishalkamble3646 2 жыл бұрын
I didn't understand if condition j==n in hollow decreasing triangle. Could you please explain in short
@SimplyCoding
@SimplyCoding 2 жыл бұрын
A decreasing triangle has j loop from i to n -> for (int j = i; j
@vishalkamble3646
@vishalkamble3646 2 жыл бұрын
@@SimplyCoding understood mam thank you🙏
@jacksonpatrick3454
@jacksonpatrick3454 2 жыл бұрын
i dont understand the n/2+1 . can you please explain it
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Take a example to understand it. Lets say you have pattern of 5 stars so middle row/col is 5/2 + 1 which is 3. If it is pattern of 7 stars, then the middle row is 7/2 + 1 which is 4 and so on.
@ambarishshiva7167
@ambarishshiva7167 2 жыл бұрын
Madam using string to this method answer showing wrong output.for eg input gives Harish
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Can you send the exact question and your code to info@simplycoding.in?
@mouni-o-
@mouni-o- 2 жыл бұрын
Mam how to print for diffent Symonds in row and column like -, / , | for this symbols in hollow
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Can you give an example of what kind of pattern you want?
@mouni-o-
@mouni-o- 2 жыл бұрын
@@SimplyCoding to build pattern / | / | / | /____|
@kamranshehzad6560
@kamranshehzad6560 Жыл бұрын
Anyone tell me please can we make kite following these patterns if yes then how ?
@ramakohilae4315
@ramakohilae4315 2 жыл бұрын
Can you please explain j==n in hollow decreasing triangle?
@lxshya
@lxshya Жыл бұрын
wrong hai
@whagKoppulaSupriya
@whagKoppulaSupriya 2 жыл бұрын
Mam the videos are awesome but we are using more no of for loops
@SimplyCoding
@SimplyCoding 2 жыл бұрын
That's correct, number of loops are more but its easier to remember and implement for a beginner. Once you are a bit experienced, you will know how to merge the loops.
@kunalsoni3906
@kunalsoni3906 2 жыл бұрын
@@SimplyCoding maam but u should teach us from beginner to advanced way , what if someone will not get the way to merge the loops then.
@SimplyCoding
@SimplyCoding 2 жыл бұрын
@@kunalsoni3906 We have basic videos on just understanding for loop and then programming for exams/entrance. Truthfully, no one has come back to learn how to merge the loops as none of the tests count how many for loop you have used. They check if the output is correct or not.
@kunalsoni3906
@kunalsoni3906 2 жыл бұрын
@@SimplyCoding but ma'am it's creating time complexity. And let me tell u something I started doing patterns from your video but than at some patterns through your method I am not able to do that exact pattern. And please on request in the last part of video you show us some patterns to solve, kinda put solutions of that pattern. As I am struggling in solving them.
@SimplyCoding
@SimplyCoding 2 жыл бұрын
@@kunalsoni3906 Kunal all the code is available at the link given. In case you are having any difficulty in writing any of the patterns, pls send us you code at info@simplycoding.in and we would be happy to help.
@robloxplayeronly8711
@robloxplayeronly8711 6 ай бұрын
if you are my teacher, i would be an expert.
@sivamaniroyal8011
@sivamaniroyal8011 2 жыл бұрын
Plz Make this video On Python
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Sure, we will work on it
@sivamaniroyal8011
@sivamaniroyal8011 2 жыл бұрын
@@SimplyCoding Tq Mam
@t4tabrez36
@t4tabrez36 2 жыл бұрын
Plz do vedios for Java part 3
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Sorry, what do you mean by Java part 3?
@Movies_elitee
@Movies_elitee 7 ай бұрын
At 14:18 why it can't be j==1 since you showed i==1,j==1,j==i
@habeebkinlolu9668
@habeebkinlolu9668 10 ай бұрын
hitting the subscribe button was too early for me 🥰
@muhmmadsaleh3145
@muhmmadsaleh3145 2 жыл бұрын
Hill pattern code is not giving the desired pattern and the diamond pattern also plaease correct it
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Can you send your code at info@simplycoding.in so that we can help correct it?
@lakshyagupta9435
@lakshyagupta9435 Жыл бұрын
In hollow decreasing triangle j==i is wrong
@karunashivde8487
@karunashivde8487 9 ай бұрын
Some are not giving the expected output
@DebadritaMajumdarF
@DebadritaMajumdarF 11 ай бұрын
Ma'am the butterfly patttern
@mousmigound5347
@mousmigound5347 Жыл бұрын
12:11
@user-oz5vd6jl2z
@user-oz5vd6jl2z 11 ай бұрын
🤔🤔🤔🤔🤔🤔 how it so easy
@legitimate_kangaroo
@legitimate_kangaroo Жыл бұрын
Improve the sound quality please
@karanpandey375
@karanpandey375 5 күн бұрын
Mam we need video on DSA IN JAVA so plz make video's on DSA bcz DSA is on hype so, if u will make vdo on this then u will get more like and subscribe..... Plz make line by line playlist on DSA 🙏🙏 I promised I will give u more subscribers☺️ Plz Plz...
@fathimaafreen6231
@fathimaafreen6231 Ай бұрын
mam hollow decreasing triangle is not working . here the correct code: #include int main() { int limit, i, j; printf("Enter a limit: "); scanf("%d", &limit); for (i = 1; i
@MR-gv4bv
@MR-gv4bv 2 жыл бұрын
Middle row = n/2+1 can anybody elaborate ?
@SimplyCoding
@SimplyCoding 2 жыл бұрын
Suppose n is 7. Since n is int, when we do n/2, it will give 3 as decimal part will be truncated. However middle row is 4. so we add 1 to it.
@MR-gv4bv
@MR-gv4bv 2 жыл бұрын
@@SimplyCoding so if n is 8 is it just n/2 ? not n/2+1 ?
@MR-gv4bv
@MR-gv4bv 2 жыл бұрын
@@SimplyCoding and what about Left diagonal ? i+j == n+1 ? what 1 for ? why it really different from Major diagonal ?
@SimplyCoding
@SimplyCoding 2 жыл бұрын
It case of even nos. like 8, technically there is no middle row, it can be fourth or fifth or both. if your exam question asks you to handle it, I am sure you can work out the middle rows since you know the formula now.
@rakeshbaral798
@rakeshbaral798 2 жыл бұрын
middle row and column formula is wrong if user want even number of row's like n=2,4,6......
@SimplyCoding
@SimplyCoding 2 жыл бұрын
There is no middle row or column if there is even n.
@rakeshbaral798
@rakeshbaral798 2 жыл бұрын
@@SimplyCoding point 👍
@swarnalathas4032
@swarnalathas4032 8 ай бұрын
In cross pattern 10:34 If n is even then this logic wont work
@akashsahu5937
@akashsahu5937 4 ай бұрын
hollow decreasing triangle was incorrect , it should be package Loops_in_Java; public class right_downward_triangle_hollow { public static void main(String[] args) { int n = 5; for (int i = 1; i
Solve any Star Pattern program in Python
18:44
Simply Coding
Рет қаралды 866 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 611 М.
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 114 МЛН
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 30 МЛН
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
How to solve any Star Pattern Program
18:47
Simply Coding
Рет қаралды 1,1 МЛН
Punch Card Programming - Computerphile
14:55
Computerphile
Рет қаралды 873 М.
Hollow Rectangle Pattern in Java - Hindi
11:46
GagMansa- Learn Java
Рет қаралды 4,5 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 767 М.
patterns in C - Tips and Tricks
1:18:42
CSE GURUS
Рет қаралды 804 М.
Java Program #22 - Print Diamond Shape Star Pattern in Java
8:19
Programming For Beginners
Рет қаралды 28 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 764 М.
How to Solve MCQ questions on switch case in Java
15:34
Simply Coding
Рет қаралды 2,6 М.
Top 5 algorithms for interviews
0:47
Sahil & Sarra
Рет қаралды 407 М.
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 114 МЛН