6:04 from E node it should backtrack to B and again it should backtrack to A and then it reaches c node
@Adarshsahni1
4 жыл бұрын
ya bro
@mehmetayparyangozalumni2606
4 жыл бұрын
it does but since you dont take the value twice, this is even a better representation
@abharathi5193
4 жыл бұрын
Exactly
@Monkeydluffy-we2fk
2 жыл бұрын
Yes
@aryankali5446
2 жыл бұрын
@Bloody Kheeng teacher not explain properly. this is wrong way to explain this algorithm you can watch gate smashers KZitem channel for this algorithm
@satyasrujan2349
3 жыл бұрын
Hi to all the cse students!
@kamaleshbs2888
2 жыл бұрын
Hi to all bca students
@travelwithme6415
2 жыл бұрын
Hi bro.. Im EEE student 😀
@learnaiartificialintellige4291
Жыл бұрын
Hlw guys
@maddy0083
Жыл бұрын
Dai poi padida
@Nagendra31312
Жыл бұрын
Hi to all AI students
@sanjusingha1714
3 жыл бұрын
Notes ●QUEUE:-A type of a data structure in which the elements are inserted and deleted according to the FIFO (First In First Out) principle. ●Working:- A Queue can be implemented using an ARRAY in which > every new element which is inserted in the END: Enqueue > If any element has to be removed, it is removed from the starting point: Dequeu ------------------------------------------------------------------- ●STACK :- A type of a data structure in which the elements are inserted and deleted according to the LIFO (Last In First Out) principle. ● Working:-A STACK can be implemented using an array in which > every new element which is inserted, is inserted at theTOP (PUSH) > If any element has to be removed, it is removed from the TOP (POP)
@sanjusingha1714
3 жыл бұрын
For Example Mujhe lgta hai yeh "B" pr wapis hi nahi jayega,yeh "D"->"E"->"C"->"G" jayega. ------------------------------------------------------------------- Algorithm of DFS:- 1. START WITH EMPTY STACK 2. INSERT THE ROOT NODE (INITIAL STATE) IN THE STACK 3. CHECK IF THE ROOT NODE IS THE GOAL NODE IF THE ROOT NODE IS THE GOAL NODE, SEARCH IS SUCCESSFUL ELSE REMOVE ROOT 4. PUSH: INSERT CHILD (SUCCESSOR) NODES OF THE NODE REMOVED FROM THE QUEUE 5. POP: Remove the topmost node from the STACK 6. CHECK IF THE POPPED NODE IS THE GOAL NODE 7. IF THE POPPED NODE IS THE GOAL NODE, PRINT (SEARCH SUCCESSFUL) AND EXIT ELSE, REPEAT STEPS 4 TO 7 UNTIL THE SEARCH IS SUCCESSFUL OR ALL THE NODES OF THE TREE HAVE BEEN TRAVERSED AND THE STACK IS EMPTY IF THE GOAL STATE IS NOT FOUND , PRINT (SEARCH UNSUCCESSFUL) AND EXIT _______________________________________ Step1: Insert (PUSH) the initial state (root node) S on TOP of STACK Step 2: POP S and PUSH it’s child nodes H and A Step 3: POP A and PUSH it’s child nodes C and B Step 4: POP B and PUSH it’s child nodes E and D Step 5: POP D but D has no child ! Move to the next node E Step 6: POP E but E has no child ! Move to the next node C To reach node C, we will have to backtrack from level 3 to level 2 Step 7: POP C and PUSH it’s child node G Step 8: POP G. G is the GOAL STATE !! SUCCESS !!
@akrishnasamysamy3857
8 ай бұрын
Mm
@Yua2252
2 жыл бұрын
Not only the contents but the "Hi, Students" motivates me to watch all the videos related to my study ❤️🙌 Thank you so much mam ❤️🙏
@dikshakaushal9711
3 жыл бұрын
E node should be back toh A nd then it traversed to C nd G
@mahalakshmia3287
5 ай бұрын
Aiml students assemble
@MandeepSingh-td2ic
4 ай бұрын
A relatively simple real-world processes made so complex and ambigious in computer programing
@isaacfash580
3 жыл бұрын
For the backtracking how did E connect straight with C? No connection exist between them, it should go back to B, A, C and then G. Am I right?
@rohan8758
2 жыл бұрын
you are right dude
@027_fervezahamed.a7
2 жыл бұрын
while back track it already visited b and a so only
@abhinay_2004
4 ай бұрын
My thinking....once it backtracks it deletes the appropriate node as it is already visited.Hemce B,C,A are not present in tree while backtracking and hence visits G directly
@ashutoshdurgule4011
2 жыл бұрын
Thanks mam you made this topic easier... 🙏
@ankitdahiya5367
4 жыл бұрын
Thank u mam...best wishes
@srichandanajada9603
3 жыл бұрын
BFS implemented by FIFO Principle. Similarly, DFS implemented by what??
@ANKITSINGH-rt3yw
3 жыл бұрын
Last in first out (stack)
@mohamedessam3054
3 жыл бұрын
BFS is optimal assuming uniform cost across edges otherwise it is not optimal
@alberthmckenzie2772
4 жыл бұрын
Thank you for allowing me to survive University.
@linetisutsa5374
2 жыл бұрын
🙏👍you and me man....
@mehmetayparyangozalumni2606
4 жыл бұрын
What, how many values does DFS holds on its stack at once? (unlike BFS that holds B^L) Thanks again and again ,this is a topic of 3 semesters just in between 10-20
@sunnysai8811
2 жыл бұрын
At 9:16 some aunty in telugu speaking " Ha em anavu" 😂😂
@sadanandacharb8284
2 жыл бұрын
When a weighted graph is given, what is the order we should select the adjacent edge in DFS, should we select the least cost edge first ? please answer this
@Saiteja-uz5og
4 ай бұрын
Where is f
@reyy9220
7 ай бұрын
you're awesome thank you sm for these videos
@tannubajpai4782
2 жыл бұрын
Nice one Bhanu Priya Ma'am
@kaviya1146
2 жыл бұрын
Tqq sis for this useful session 👌👌
@Mass_Maha_Raja_Ravi_Teja-v1q
Ай бұрын
thanks a lot mam
@daredevilrbl1254
3 жыл бұрын
What "n" in time complexity ?
@NagaSiddhardha-e5m
4 ай бұрын
Thank you mam
@Naveen.1431
5 ай бұрын
TQ Mam ❤
@FundamentalofElectronicsbyDrHa
3 жыл бұрын
backtracking node E to C How?
@greeshma-sp9tv
3 жыл бұрын
Not possible ryt ? I too had same doubt. !!
@sujitvellulla
2 ай бұрын
IT🎉
@learnandgetresult5754
3 жыл бұрын
Nice presentation mem
@chethanm3694
2 жыл бұрын
good teaching.. thank u..
@Parikarthik369
Жыл бұрын
Tq so much mam love ❤️ u mam
@gregpa1051
2 ай бұрын
So whats the path?
@125SelvakumarS
Жыл бұрын
everything is from javatpoint
@manikantareddymanikantared557
3 жыл бұрын
Thank you 🤗
@xiaomichina5884
4 жыл бұрын
Please mam show your face I have a great wish to see our teachers at least once
Пікірлер: 70