Bhot he badiya beta, aise he lge rho, mehnat krte rho aur apna pyaar bnai rkhiyega hum par taki hum aise he aacha aacha content bnane k liye motivated rhe.
Excellent! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Completed level 1 of graphs, and because of it i was able to easily solve leetcode medium level questions. Feeling really confident now. Thanks a lot for your efforts sir🙏
From knowing nothing about graph to solving problems based on graph right after completing level 1.ConfidenceLevel++ Ways to go. To the point. Hats off you sir!! Thanks for all your efforts in making this series awesome!
nothing is even comparable or comapartor to sumeet sir teaching style. Sir U are the reason i feel so confident in solving coding problems, Your teaching style is uncomparable.
level 1 ✅😎 ab 2 hafta revision & leetcode solve karunga in questions ka fir August end ya September starting se level 2 ki journey ki shuruwaat feeling excited and confident. OA jo hote hai companies ke unme questions smajh aane lag gaye hai aur kayi baar to solve bhi ho jaate hai but mcq me dikkat aati hai abhi uski bhi prep karunga !! Core subjects bhi karne hai, thodi bhot apti bhi
sir aapki wajah se aaj internship test ka coding question kar paaya nahi to blank ho jaata tha har baar kuch samajh hi nahi aata tha ki question mai.But ab visualize kar paata hun approach.Hats off sir to your teaching !!🙌
its a request to all the fellow student please off the ads blocker from your computer and watch the complete ads this little help we can easily do for this channel .
bhai sahab foundation course khatam thank you sir for all those videos and questions seriously mera best decision hoga life kaa ki sahi time par sahi cheez follow ki....
Sir.. all of your videos are awesome and it helped me a lot... so here I am requesting you to create more videos on graph related algorithms and questions... It will be a greater help again.
Sure I will do graphs again. Just after DP. I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem. If you like my efforts, I request a review g.page/Pepcoding/review?rc
Sir level 1 toh karwa diya aapne par level 2 ki videos kisi aur ne bana rakhi hain toh maza nhi aa rha hai , aur sir aap aur videos kyun nhi bana rhe hain, gaayab hi ho gaye hain sir aap toh
sir recursion me dfs regular euler path follow kerta hai or Stack ke case me reverse euler path kya hum stack ke case me without reverse euler path ke ker sakte hai
For better experience and well-organised content visit - nados.pepcoding.com You can post your query on community tab as well and don't forget to follow us on Instagram instagram.com/pepcoding/
Sir,Foundation course complete krlia proper notes bnaa ke sb smjh ke foundation course start krne se pehle mere hackerrank pr 6 star the problem solving me or rank 6k thi lekin fr bhi confidence ni tha ke foundation level bhi thik hai ya ni ab is course ko krke kaafi improvement feel hori hai 1 october se level up start krdunga ab se 1 oct tk revision foundation ka. Thank you much sr for providing the course.
I have done it by taking state variable , like we used to do in trees for iterative traversals import java.io.*; import java.util.*; public class Main { static class Edge { int src; int nbr; Edge(int src, int nbr) { this.src = src; this.nbr = nbr; } }
static class Pair{ int vtx ; String psf ; int state ;
top.state++; } } } public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int vtces = Integer.parseInt(br.readLine()); ArrayList[] graph = new ArrayList[vtces]; for (int i = 0; i < vtces; i++) { graph[i] = new ArrayList(); } int edges = Integer.parseInt(br.readLine()); for (int i = 0; i < edges; i++) { String[] parts = br.readLine().split(" "); int v1 = Integer.parseInt(parts[0]); int v2 = Integer.parseInt(parts[1]); graph[v1].add(new Edge(v1, v2)); graph[v2].add(new Edge(v2, v1)); } int src = Integer.parseInt(br.readLine()); int dest = Integer.parseInt(br.readLine()); // write your code here DFSIterative(graph,src,dest); } }
bhdiya bhai, meri bhi pahele approach yahi thi comment mai dekh raha tha ki kisi aur ne bhi kiya hai kya aise. by the way, are you there on NADOS, if yes then your username ?...
isme bhi kaam to wahi horaa par accept nahi horaaa import java.io.*; import java.util.*; public class Main { static class Edge { int src; int nbr; Edge(int src, int nbr) { this.src = src; this.nbr = nbr; } } static class Pair{ int src; String psf; Pair(int vertex,String psf){ this.src=vertex; this.psf=psf;
} } public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int vtces = Integer.parseInt(br.readLine()); ArrayList[] graph = new ArrayList[vtces]; for (int i = 0; i < vtces; i++) { graph[i] = new ArrayList(); } int edges = Integer.parseInt(br.readLine()); for (int i = 0; i < edges; i++) { String[] parts = br.readLine().split(" "); int v1 = Integer.parseInt(parts[0]); int v2 = Integer.parseInt(parts[1]); graph[v1].add(new Edge(v1, v2)); graph[v2].add(new Edge(v2, v1)); } int src = Integer.parseInt(br.readLine()); // write your code here dfsIterative(graph,src);
Sir main c++ se karta hu toh mera ek doubt tha ki mujhe kya java switch karni padegi ya sikhni padegi apne resume me daalne ke liye .. ya fir ds algo c++ me bhi chal jayega ...? By the way thanks for this playlist sir. Thanks a lot .
Mza aa gya ye comment dekh kar. beta stack aur heap dono he ram mei hoti hai. JAVA heap ko jyada memory deti hai. Reason nahi janta ki kyun. Jyada space deti hai, ye pta hai. Tumhe content acha lga ho to ek google review daal do yar g.page/Pepcoding/review?rc
Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
sir foundation ke graphs ke baad bhi bohot dikkat aa rhi hai, leetcode ke medium and hard nhi ban rhe, sir aap level2 mein as maximum as possible questions karaega graphs ke
Level 1 ho gaya finally!!! I'm feeling very confident now... But there's still a long way to go. Thanks a lot for all your efforts sir!
Bhot he badiya beta, aise he lge rho, mehnat krte rho aur apna pyaar bnai rkhiyega hum par taki hum aise he aacha aacha content bnane k liye motivated rhe.
Thank you sir! Finally Level 1 completed. Confidence++
Excellent! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
If there is any Government recognition for teachers in parallel to what is for sportsmen- Arjuna Award, SM Sir deserves it hands down.
Agreed
Completed level 1 of graphs, and because of it i was able to easily solve leetcode medium level questions. Feeling really confident now. Thanks a lot for your efforts sir🙏
From knowing nothing about graph to solving problems based on graph right after completing level 1.ConfidenceLevel++ Ways to go. To the point. Hats off you sir!! Thanks for all your efforts in making this series awesome!
nothing is even comparable or comapartor to sumeet sir teaching style. Sir U are the reason i feel so confident in solving coding problems, Your teaching style is uncomparable.
kya padaya sir apne!! ...maza aa gaya..foundation ki safar bahut mazedar thi...ab to level up start karege ..Hurrey
Completed Level 1 finally Thankyou so much Sumit Sir
level 1 ✅😎
ab 2 hafta revision & leetcode solve karunga in questions ka fir August end ya September starting se level 2 ki journey ki shuruwaat
feeling excited and confident. OA jo hote hai companies ke unme questions smajh aane lag gaye hai aur kayi baar to solve bhi ho jaate hai but mcq me dikkat aati hai abhi
uski bhi prep karunga !!
Core subjects bhi karne hai, thodi bhot apti bhi
sir aapki wajah se aaj internship test ka coding question kar paaya nahi to blank ho jaata tha har baar kuch samajh hi nahi aata tha ki question mai.But ab visualize kar paata hun approach.Hats off sir to your teaching !!🙌
Finally level 1 done
Milte hai agle level me
Thanku so much sir
this graph tutorial its really awesome. Now i am confident in graph topic and cleared my concept also. Thank you so much
graphs have never been so easy before this. Dhanyavad sir. Bss jldi se Level 3 start krdo Level 2 khtm krke.
hanji beta. lage hue hain
@@Pepcoding aya level 3?
Finally completed Level 1 on 28-05-2022,
Feeling confident, will be back and update here once I join
PBC.
kitna time laga aapko khatm karne me level 1?
mujhe 4 mahine lag gaye xD
aur abhi aap kya kar rahe ho?
its a request to all the fellow student please off the ads blocker from your computer and watch the complete ads this little help we can easily do for this channel .
bhai sahab foundation course khatam thank you sir for all those videos and questions
seriously mera best decision hoga life kaa ki sahi time par sahi cheez follow ki....
ab level2 shuru kijie. Mere sath sath khatam kar dijie.
Sir.. all of your videos are awesome and it helped me a lot... so here I am requesting you to create more videos on graph related algorithms and questions... It will be a greater help again.
Sure I will do graphs again. Just after DP.
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like my efforts, I request a review
g.page/Pepcoding/review?rc
@@Pepcodingthnq so much sir... I am completing all of your playlists as all of them are very helpful... and I am definitely gonna drop my review...
@@pujasingh1413 how much of level 2 have you completed?
@@Sid1699 congo on finishing level 1
maine bhi abhi khatm kiya :)
@@kashba nice :)
Thank you so much sir..for this amazing content...♥ #best content on youtube
Legendary as always
very nice sir. maze Aaya
Keep watching
Sir level 1 toh karwa diya aapne par level 2 ki videos kisi aur ne bana rakhi hain toh maza nhi aa rha hai , aur sir aap aur videos kyun nhi bana rhe hain, gaayab hi ho gaye hain sir aap toh
sir recursion me dfs regular euler path follow kerta hai or Stack ke case me reverse euler path kya hum stack ke case me without reverse euler path ke ker sakte hai
For better experience and well-organised content visit - nados.pepcoding.com
You can post your query on community tab as well and don't forget to follow us on Instagram instagram.com/pepcoding/
Neighbours add karte waqt ulte order me loop lagake aisa kar sakte hain
Sir,Foundation course complete krlia proper notes bnaa ke sb smjh ke
foundation course start krne se pehle mere hackerrank pr 6 star the problem solving me or rank 6k thi
lekin fr bhi confidence ni tha ke foundation level bhi thik hai ya ni
ab is course ko krke kaafi improvement feel hori hai
1 october se level up start krdunga ab se 1 oct tk revision foundation ka.
Thank you much sr for providing the course.
best of luck beta. Lage rahie.
@@Pepcoding thank you sir
Hey can you share the notes?
Love you sir!!!
nice to see that your channel can now show ads too !
Arey bhool gae. Sunday ko on karte hain. Aj off karna tha.
@@Pepcoding lol off kyu karoge ? keep them on
@@Pepcoding keep them on sir, atleast I have no problem with adds.
Level1 completed☑
Thakuuuuuu saarrrrrr....😭
sir but aise to sare paths explore nhi honge na DFS mai , kyoki jate vakt unvisited nhi kr rahe hai hum , means agar hame printAll paths karna hota to
I have done it by taking state variable , like we used to do in trees for iterative traversals
import java.io.*;
import java.util.*;
public class Main {
static class Edge {
int src;
int nbr;
Edge(int src, int nbr) {
this.src = src;
this.nbr = nbr;
}
}
static class Pair{
int vtx ;
String psf ;
int state ;
public Pair(int vtx,String psf,int state){
this.vtx = vtx ;
this.psf = psf ;
this.state = state;
}
}
public static void DFSIterative(ArrayList[] graph,int src,int dest){
boolean[] visited = new boolean[graph.length] ;
Stack st = new Stack();
st.push(new Pair(src,src+"",-1));
while(st.size()>0){
Pair top = st.peek();
if(top.state==-1){
// first time visiting - pre
visited[top.vtx] = true ;
if(top.vtx==dest)
System.out.println(top.vtx+"@"+top.psf);
top.state++;
}else if(top.state==graph[top.vtx].size()){
// last time visiting going back - post
visited[top.vtx] = false ;
st.pop();
}else{
// intermediate visitings
Edge e = graph[top.vtx].get(top.state);
if(visited[e.nbr]==false)
st.push(new Pair(e.nbr,top.psf+e.nbr,-1));
top.state++;
}
}
}
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int vtces = Integer.parseInt(br.readLine());
ArrayList[] graph = new ArrayList[vtces];
for (int i = 0; i < vtces; i++) {
graph[i] = new ArrayList();
}
int edges = Integer.parseInt(br.readLine());
for (int i = 0; i < edges; i++) {
String[] parts = br.readLine().split(" ");
int v1 = Integer.parseInt(parts[0]);
int v2 = Integer.parseInt(parts[1]);
graph[v1].add(new Edge(v1, v2));
graph[v2].add(new Edge(v2, v1));
}
int src = Integer.parseInt(br.readLine());
int dest = Integer.parseInt(br.readLine());
// write your code here
DFSIterative(graph,src,dest);
}
}
bhdiya bhai, meri bhi pahele approach yahi thi comment mai dekh raha tha ki kisi aur ne bhi kiya hai kya aise.
by the way, are you there on NADOS, if yes then your username ?...
sir hamne find all paths main dfs use kiya tha , bfs ko use karke kar sakte hai ?
aur sir graph ka level up kab se start karenge aap , bohot improvement ho rha sir . Thanks Sir !!
Level 1 done tysm sir now what should I do
Completed Level 1
sir graph ka level 2 bhi dal dijiye
Awesome insights...
Thanks beta!
If you like our efforts, will you like to write a review about us here - g.page/Pepcoding/review?rc
and level 1 is finally complete !! :D
Bhot bdiya beta, aise he lge rho👍😊
Level 1 complete !!!
Keep learning, Keep growing and keep loving Pepcoding!😊
sir please make a video on time complexity
hanji jaroor
isme bhi kaam to wahi horaa par accept nahi horaaa
import java.io.*;
import java.util.*;
public class Main {
static class Edge {
int src;
int nbr;
Edge(int src, int nbr) {
this.src = src;
this.nbr = nbr;
}
}
static class Pair{
int src;
String psf;
Pair(int vertex,String psf){
this.src=vertex;
this.psf=psf;
}
}
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int vtces = Integer.parseInt(br.readLine());
ArrayList[] graph = new ArrayList[vtces];
for (int i = 0; i < vtces; i++) {
graph[i] = new ArrayList();
}
int edges = Integer.parseInt(br.readLine());
for (int i = 0; i < edges; i++) {
String[] parts = br.readLine().split(" ");
int v1 = Integer.parseInt(parts[0]);
int v2 = Integer.parseInt(parts[1]);
graph[v1].add(new Edge(v1, v2));
graph[v2].add(new Edge(v2, v1));
}
int src = Integer.parseInt(br.readLine());
// write your code here
dfsIterative(graph,src);
}
static void dfsIterative(ArrayList[] graph,int src){
Stack st=new Stack();
boolean []visited=new boolean[graph.length];
st.push(new Pair(src,src+""));
visited[src]=true;
while(!st.isEmpty()){
Pair vertex=st.pop();
System.out.println(vertex.src+"@"+vertex.psf);
for(int i=0;i
you are a boss sir
Glad you think so Beta
@@Pepcoding Sir can you make a video on Markov Decision Process?
Sir main c++ se karta hu toh mera ek doubt tha ki mujhe kya java switch karni padegi ya sikhni padegi apne resume me daalne ke liye .. ya fir ds algo c++ me bhi chal jayega ...? By the way thanks for this playlist sir. Thanks a lot .
You are welcome. C++ is fine. You need not shift to java. You can still use my playlist for logics and then code in c++
@@Pepcoding yess sir i am going through your whole playlist because i love the way you explain all the logics behind every topics.
Sir, heap m memory zyada kyo hoti h.
Heap ram m bnta h?
BTW, Thank you Sir so much. Today finished your foundation course.
Mza aa gya ye comment dekh kar. beta stack aur heap dono he ram mei hoti hai. JAVA heap ko jyada memory deti hai. Reason nahi janta ki kyun. Jyada space deti hai, ye pta hai.
Tumhe content acha lga ho to ek google review daal do yar
g.page/Pepcoding/review?rc
@@Pepcoding done!!
@@Pepcoding Sir, leetcode p medium nhi ho paa rhe aapke dp vgrh vle approaches bhu sa gya hu
@@Pepcoding Done Sir!
sir, How will we do topological sort using iterative DFS?
Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
finally its done!!
Sir order of compilation video??
bna rha hun beta. aap log calls kar kar ke speed slow kar rhe ho meri.
where is level 2 ?
sir level up ki video kab dalegi ?
Aj shuru hoe jaengi
Brilliant
sir foundation ke graphs ke baad bhi bohot dikkat aa rhi hai, leetcode ke medium and hard nhi ban rhe, sir aap level2 mein as maximum as possible questions karaega graphs ke
Beta, jab level-1,2 aur 3 dono complete ho jayege aur aap khud se ek iteration lga loge fr btana.
In the meanwhile, solutions dekh dekh kr sikhte rho
@@Pepcoding sure sir
Sir ads on rakha karo, befaaltu ki utube videos par hote hain. aap to deserve karte ho, main poore ads dekha karoonga.
nhi yar, firr doosri ed-tech companies ki ads aati hain ispe
@@Pepcoding please put adds.
Sir mene Ye foundation Pura kiya he. Aage Kya karu?
Beta level-2 start kr lo ya leetcode se topic wise questions kr lo.
east or west sumeet sir is the best
Keep learning, Keep growing and keep loving Pepcoding!😊
Sir please make more videos on graph and data structures🙏 🙂🙂 i can't able to affort your paid courses🙏👍
As soon as possible
Sir, plz graph ka level up start kr dijiye!
hanji. soon
Someone share the code ?
Available on nados