Advanced Pattern Questions | Java | Complete Placement Course - Lecture 6

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


Notes of this Lecture:
Рекомендации по теме
Комментарии
Автор

Very Good explanation Ms. Shradha

Knowing coding is great but knowing explaining coding to other person so well is marvelous.

amrit
Автор

Didi literally looked happy when that butterfly wala code got printed😆

aryanrao
Автор

Time stamps for convince 👨‍💻👨‍💻


00:47 --> Butterfly pattern
15:58 --> solid rhombus
21:36 --> number pyramid
27:00 --> palindromic pyramid
33:10 --> diamond pattern

hehhe
Автор

Thank you so much didi.
In the previous video I wasn't able to make even a single pattern without the solution.
Today after the butterfly question, I was able to do each and every pattern without the solution.
I would like to say that, Persistence is the key guys. Keep working hard and shine like stars in the sky.

shauryagauniyal
Автор

Pascals Traingle Solution (incase anyone's wondering how):

for (int i = 0; i < n; i++) {
int count = 1;
for( int j =0 ; j<= n-i ; j++){
System.out.print(" ");
}
for (int j = 0; j <= i; j++) {
System.out.print( count+ " ");
count = count * (i - j) / (j + 1);
}
System.out.println();
}

callmesirjustsir
Автор

cant tell u how happy I got when I paused the vdo and cracked the rhombus code myself and got succesful output with your help..thanks for building my concepts

nawaab
Автор

Need this type of practice question in every topic. Hope you continue like this. And thanks for this awesome session😍

iqbalhossain
Автор

Didi, your diamond pattern's logic was are keeping the row number as it is and just in j loop you have taken the logic of odd as 2*i-1. As a result row number can be easily accessed for other tasks....wonderful!!!

ArijitsClasses
Автор

Hello ma'am,

I really appreciate your efforts and your way of explaining... I am from non IT background, i just think to go through the fundamentals of programming nd firstly i gone through your two or three lectures, now i can must say that programming is not that much hard as all are think..its just becuz of your way of teaching.. Thank you so much for this courses...

dipakkadam
Автор

Hi Ma'am, huge respect for you for taking this initiative to teach us. The courses are simple, clear, and to the point. As a person from a non-engineering background, the sessions are very productive and easy to understand. It also pushes me to practice more and come up with my own solutions. I've solved the number pyramid problem in another way and believe it may also be helpful. Please find the code below: -
int a = 5;
int b = 9;
for(int i= 1;i<=a;i++){
for (int j=1;j<=b;j++){
int sum =i+j;
int diff = j-i;
//if we observe closely, the numbers are printed only on the cells where the sum of i&j are
// divisible by 2, sum of i&j is always more than 5, and their difference is
// less than or equal to 5. condition statement
//below: -

System.out.print(i);
}
else{
System.out.print(" ");
}
}
System.out.println();
}

amlansingha
Автор

Absolutely brilliant you way of teaching absolutely incredible

Samad_
Автор

You guys are helping a lot...and thanks for this series, Didi...Respect++

asishchowdhury
Автор

I see programming is all about Mathematical logics, once you know the concepts you just need to apply them. This things (Coding) is not even any branch specific so I guess If you love math then it's perfect to code and for me I am totally fine.

jatinsharma
Автор

dear didi, the diamond in question and the diamond we got in the video\notes are not same.
in order to get the same diamond ;
in spaces we need to have double spaces ;in printing * we need to have * +space;
and after upper half we need to give a space and reverse the upper half.

I am very greatful to this series and thx for your teachings didi.

manikanta
Автор

I'm from Pakistan and I like your all hard work for all the IT students

mariaashraf
Автор

Incredible explanations 🔥🔥🔥 best course for java fundamentals

nemeziz_prime
Автор

Thank you so much! This series is helping a lot to me and Your lectures made coding much easy to me.
I'm a non IT student so this field is completely new for me it seems difficult when i was started a week ago but from your lectures I'm now able to get solve the questions, making logic by own and now I'm much familiar with this! :)

abhijeetsalve
Автор

another approach for the diamond question is the same as palindromic pattern:
for(int j = i; j >= 1; j--){
System.out.print(j);
}
for(int j = 2; j <= i; j++){
System.out.print(j);
}

We can just print * instead of j and then flip the row and it will be exactly



Anyways had fun completing the video. thanks

AyushSingh-kzgm
Автор

Diamond can also by coded as: ( Lecture 6 Q5 Similar to Q4 ) : like butterfly
int n = 5;
for(int i=1; i<=n; i++) {
//spaces
for(int j=1; j<=n-i; j++) {
System.out.print(" ");
}

//first part
for(int j=i; j>=1; j--) {
System.out.print("*");
}

//second part
for(int j=2; j<=i; j++) {
System.out.print("*");
}
System.out.println();
}
for(int i=n; i>=1; i--) {
//spaces
for(int j=1; j<=n-i; j++) {
System.out.print(" ");
}

//first part
for(int j=i; j>=1; j--) {
System.out.print("*");
}

//second part
for(int j=2; j<=i; j++) {
System.out.print("*");
}
System.out.println();
}

iamspidysa
Автор

10) Butterfly pattern : 0:50
11). Solid Rhombus: 15:50
12). Number pyramid : 21:24
13). Palindromic pattern : 26:56
14). Diamond pattern: 33:07

manu--gjis