2.94K subscribers
7 photos
4 files
237 links
This channel is all about programming. Happy coding :)
Download Telegram
This Sunday I will be taking a LIVE session on a typical recursion problem where people can ask LIVE questions to get the topic absolutely clarified. This will only be for channel members and it's a beta phase work. Once it's successfull I will announce to everyone.
Thanks for your love & support ❤️
Happy new year everyone ❤️ May this new year be healthy, prosperous and joyful for you all 🎉
𝐇𝐢 𝐂𝐨𝐝𝐞𝐫𝐬!!

Is 𝐆𝐑𝐀𝐏𝐇 algorithm your biggest worry in interview prep ?

Do you want to greatly improve and gain confidence in 𝐆𝐑𝐀𝐏𝐇 algorithms ?

If you answer is 𝐘𝐄𝐒, then you should join our 30 𝑑𝑎𝑦𝑠 𝐺𝑟𝑎𝑝ℎ 𝑝𝑟𝑜𝑏𝑙𝑒𝑚𝑠 𝑐ℎ𝑎𝑙𝑙𝑒𝑛𝑔𝑒 where I will share 1 problem a day with the solution for the same on next day with a brief on the approach used.

.

It will be posted on our 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 channel everyday for the 𝑛𝑒𝑥𝑡 30 𝑑𝑎𝑦𝑠 from 𝐉𝐚𝐧 𝟏𝐬𝐭 (evening).


#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Day-2:
Course Schedule-2: https://leetcode.com/problems/course-schedule-ii/
Leetcode #210

Please go through the algorithm from the link below (Please don’t watch the course schedule part in the 2nd half of the video without solving yourself 🙂 )
Algorithm: Topological Sort -> https://youtu.be/qe_pQCh09yU
Solution will be shared tomm evening followed by a new question 🙂

#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa
Above problem is for Day-6 🙂
Day-6: Solution
Number of Provinces
Leetcode #547

Algorithm: Disjoint Set
Code Implementation: https://gist.github.com/SuryaPratapK/fe865b1680aceda9594a5160f80fb870
Video for Disjoint Set (Union & Find): https://youtu.be/eTaWFhPXPz4
Video for Disjoint Set (Union by RANK & Find->Path Compression): https://youtu.be/kaBX2s3pYO4

Logic:-
1 Use disjoint set to add all edges
2 DSUF array will have -1 value for only absolute parents
3 No of -1 = No of absolute parents = No of components (because all absolute parents belongs to different tree, hence different components 🙃 )

Please go through the video to understand Disjoint Set and then implement in the problem 🙂



#30DaysOfGraph #techdose #interviewpreparation #graphs #dsa