Competitive Programming 16??

Competitive Programming 16??

Day 16: Graph Algorithms and Optimization.

Hello Programming Buddies??. Hope you are doing well Today i wanted to start learning a new topic that is graph algorithms and optimization.I tackled some of the problems based on my understandings.

Key concepts:

  • One problem was about topologics sorting so determinig if a graph can be sorted including all edge cases. I implemented Kahn’s Algorithm and Depth-First Search (DFS) to validate if a given graph has a valid topological order. It was fascinating to see how this approach can be used to solve scheduling and dependency problems.
  • Other problem states number of connected components in an undirected graph. So for this problem i applied depth-first search (DFS) to explore each component and track the number of distinct connected groups within the graph and counted the number of connected components in an undirected graph.
  • I learnt how to determine if a graph forms a valid tree. I checked if the graph is connected and acyclic by employing union-find data structure to manage and merge sets also ensuring the graph meets the correct criteria of the tree.

These problems were a great exercise in applying graph algorithms and optimization techniques.

Looking forward to solve more problems on Graph Algorithms and deeping my understanding over graph algorithms.Until then continue to code, face the challenges,and see you soon for more programming fun!??

"The harder the conflict, the greater the triumph." - George Washington

#CodingJourney #GraphAlgorithms #Optimization #AlgorithmChallenges #ProgrammingSkills #TechGrowth #SoftwareEngineering #LearnToCode #CodeDaily #TechPassion #DeveloperMindset #ProblemSolving #CodingPractice

要查看或添加评论,请登录

Meghana Manchala的更多文章

  • Competitive Programming 61??

    Competitive Programming 61??

    Day 61: Counting the Number of Islands in an Image, Top K Frequent Words, Permutations II, LRU Cache Dear Developers!…

  • Competitive Programming 60??

    Competitive Programming 60??

    Day 60: Permutations,subsets,letter combi Hi everyone! ?? Today, I dedicated time to work on some exciting coding…

  • Competitive Programming 54??

    Competitive Programming 54??

    Day 54: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

  • Competitive Programming 53??

    Competitive Programming 53??

    Day 53: Counting the Number of Islands in an Image, Top K Frequent Words, Permutations II, LRU Cache Dear Developers!…

  • Competitive Programming 52??

    Competitive Programming 52??

    Day 52: Cookie Handout, Lemonade Change, Maximum Units on a Truck, Two-City Scheduling and Jump Game Hello Developers!…

  • Competitive Programming 56??

    Competitive Programming 56??

    Day 56: Square of Sorted Array, Remove Element, Reverse Only Letters, Pivot Index and Check If Array Is Sorted and…

  • Competitive Programming 50??

    Competitive Programming 50??

    Day 50: Implement Queue using Stacks, Design Circular Queue, Counting Bits, Partition Labels and Candy Dear Developers!…

  • Competitive Programming 49??

    Competitive Programming 49??

    Day 49: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

  • Competitive Programming 48??

    Competitive Programming 48??

    Day 48: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

  • Competitive Programming 47??

    Competitive Programming 47??

    Day 47: Binary Search,Search in Rotated Sorted Array, Kth Largest Element in an Array, First Bad Version Dear…

社区洞察

其他会员也浏览了