
Rameshwari
@datacode2025
ID: 1784228289529380864
27-04-2024 14:29:30
172 Tweet
14 Takipçi
57 Takip Edilen

Day 142✅Of 160gfg Challenge Problem-Number Of Islands Approach- Using DFS, we traverse the grid and flood-fill land ('L') to water ('W') while tracking island count. #160gfgchallenge GeeksforGeeks #womenintech


Day 143✅Of 160gfg Challenge Problem-Topological Sort Approach- Construct adjacency lists from edges. Use DFS to traverse unvisited nodes & push them onto a stack. Pop stack to get sorted order. #160gfgchallenge GeeksforGeeks #womenintech


Day 144✅Of 160gfg Challenge Problem-Directed Graph Cycle Approach- Build adjacency list & in-degree array Process nodes with zero in-degree Reduce degrees & track visited nodes If all nodes aren’t visited, Cycle detected! #160gfgchallenge GeeksforGeeks #womenintech


Day 145✅Of 160gfg Challenge Problem-Bridge Edge in a Graph Approach-Checks if an edge ((c, d)) is a bridge by:Removing ((c, d)) from the graph.Running DFS from c to see if d is still reachable.If d is not visited, ((c, d)) is a bridge.#160gfgchallenge GeeksforGeeks #womenintech


Day 146✅Of 160gfg Challenge Problem-Articulation Point Approach-Convert edge list to adjacency list Run DFS to track discovery time & low values If root has >1 children, it's an AP If low[v] >= disc[u] & u isn’t root,it's an AP #160gfgchallenge GeeksforGeeks #womenintech
![Rameshwari (@datacode2025) on Twitter photo Day 146✅Of 160gfg Challenge
Problem-Articulation Point
Approach-Convert edge list to adjacency list
Run DFS to track discovery time & low values
If root has >1 children, it's an AP
If low[v] >= disc[u] & u isn’t root,it's an AP
#160gfgchallenge <a href="/geeksforgeeks/">GeeksforGeeks</a> #womenintech Day 146✅Of 160gfg Challenge
Problem-Articulation Point
Approach-Convert edge list to adjacency list
Run DFS to track discovery time & low values
If root has >1 children, it's an AP
If low[v] >= disc[u] & u isn’t root,it's an AP
#160gfgchallenge <a href="/geeksforgeeks/">GeeksforGeeks</a> #womenintech](https://pbs.twimg.com/media/GpUYGXsWMAAx4Su.jpg)

Day 147✅Of 160gfg Challenge Problem-Minimum Cost to Connect all house Approach-Build graph using Manhattan distance 🔹 Sort edges & apply Kruskal’s MST 🔹 Use DSU for cycle detection 🔹 Pick lowest-cost edges till all houses connect #160gfgchallenge GeeksforGeeks #womenintech


Day 148✅Of 160gfg Challenge Problem-Dijkstra Algorithm Approach-Build adjacency list 🔹 Use priority queue (Min-Heap) 🔹 Relax edges for shortest paths 🔹 Complexity: O(V + E log V) #160gfgchallenge GeeksforGeeks #womenintech


Day 149✅Of 160gfg Challenge Problem-Flood fill Algorithm Approach-Replace pixels sharing oldColor with newColor, spreading in four directions. #160gfgchallenge GeeksforGeeks #womenintech


Day 150✅Of 160gfg Challenge Problem-Clone Undirected Graph Approach-Use recursion to copy nodes while tracking originals in a HashMap for efficiency. No cycles, just clean cloning! #160gfgchallenge GeeksforGeeks #womenintech


Day 151✅Of 160gfg Challenge Problem-Alien Dictionary Approach-Construct a graph from words, then apply Kahn’s algorithm (BFS) to determine letter order. #160gfgchallenge GeeksforGeeks #womenintech


Day 152✅Of 160gfg Challenge Problem-Bellman-Ford Approach-Relax edges V times, updating shortest paths. Detect negative cycles in the last iteration. Ideal for graphs with negative weights! #160gfgchallenge GeeksforGeeks #womenintech


Day 153✅Of 160gfg Challenge Problem-Floyd Warshall Approach-Finds shortest paths between all pairs using dynamic programming! 🔹 Iterates over each vertex as an intermediate 🔹 Updates distances efficiently 🔹 O(V³) time complexity #160gfgchallenge GeeksforGeeks #womenintech


Day 154✅Of 160gfg Challenge Problem-Minimum Weight Graph Approach-Build adjacency list 🔹 Run Dijkstra’s algorithm 🔹 Check alternative paths 🔹 Return the smallest cycle found #160gfgfchallenge GeeksforGeeks #womenintech


Day 155✅Of 160gfg Challenge Problem-Implement Trie Approach-Insert: Store words using character nodes. Search: Check word existence via traversal. Prefix Check: Verify if input exists as a prefix. #160gfgchallenge GeeksforGeeks #womenintech


Day 156✅Of 160gfg Challenge Problem-Maximum Xor Of two numbers Approach-Finds the maximum XOR of two numbers using bitwise operations and a hash set for prefix storage. It iterates over bits, tracks XOR values, and updates the result #160gfgchallenge GeeksforGeeks #womenintech


Day 157✅Of 160gfg Challenge Problem-Find Only Repetitive Elements Approach-Use the hashmap to store the Occurences of the element . Then traverse through the map if the occurence of element is greater than 1 return that element #160gfgchallenge GeeksforGeeks #womenintech


Day 158✅Of 160gfg Challenge Problem-Missing in Array Approach-Sort the Array, traverse the array and check if arr[i]!=i+1 return i+1, else if(i==n-1) return arr[i]+1. #160gfgchallenge GeeksforGeeks #womenintech
![Rameshwari (@datacode2025) on Twitter photo Day 158✅Of 160gfg Challenge
Problem-Missing in Array
Approach-Sort the Array, traverse the array and check if arr[i]!=i+1 return i+1, else if(i==n-1) return arr[i]+1.
#160gfgchallenge <a href="/geeksforgeeks/">GeeksforGeeks</a> #womenintech Day 158✅Of 160gfg Challenge
Problem-Missing in Array
Approach-Sort the Array, traverse the array and check if arr[i]!=i+1 return i+1, else if(i==n-1) return arr[i]+1.
#160gfgchallenge <a href="/geeksforgeeks/">GeeksforGeeks</a> #womenintech](https://pbs.twimg.com/media/GqP-Y1WXQAAWbsR.jpg)

Day 159✅Of 160gfg Challenge Problem-Unique Number I Approach-Create a HashMap and track the occurence of each element . The element in map whose value ==1 return that element. #160gfgchallenge GeeksforGeeks #womenintech


Day 160✅Of 160gfg Challenge Problem-Unique Number II Approach-Similar to the Unique Number I problem,in todays problem just store the answer in array, sort the answer array and return it. #160gfgchallenge GeeksforGeeks #womenintech


160GFG Challenge Completed✅ What started as a challenge became a habit—160 days of problem-solving, debugging, and leveling up my DSA skills! Thank you GeeksforGeeks . #160gfgchallenge #womenintech
