Skip to content
Mission Peace edited this page Nov 1, 2016 · 4 revisions
  1. A vertex in an undirected connected graph is an articulation point (or cut vertex) iff removing it (and edges through it) disconnects the graph. ArticulationPoint.java
  2. Find shortest path from one vertex to all vertex using bellman ford algorithm - BellmanFordShortestPath.java
  3. Binary max heap - BinaryMaxHeap.java
  4. Binary min heap - BinaryMinHeap.java
  5. A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v) either connects a vertex from U to V or a vertex from V to U - BiparteGraph.java
  6. Design a game of boggle - Boggle.java
  7. An edge in an undirected connected graph is a bridge iff removing it disconnects the graph. Given a graph find all bridges in this graph - Bridge.java
  8. Given two words of equal length convert first word to second word in such a way that all intermediate words are in dictionary - ConvertOneWordToAnother.java
  9. Find cycle in directed graph - CycleInDirectedGraph.java
  10. Find cycle in undirected graph - CycleUndirectedGraph.java
  11. Given a directed acyclic graph(DAG) find shortest path from one vertex to all vertices - DAGShortestPathTopological.java
  12. Given a graph with weighted edges, find shortest path from one vertex to all vertices - DijkstraShortestPath.java
  13. Given a directed graph, return true if you can reach every node of graph from any node else false - DirectedGraphConnectivity.java
  14. Given a graph, tell if it is eulirian, semi eulirian or non eulirian - EulerianPathAndCircuit.java
  15. Given a 2D matrix of Xs and Os, convert all Os to Xs if it is surrounded by Xs - FillOsWIthXsIfSurroundedByXs.java
  16. Flood fill algorithm - FloodFillAlgorithm.java
  17. All pair shortest path using flyod warshall algorithm - FloydWarshallAllPairShortestPath.java
  18. Given a directed graph with source and end point, find maximum flow from source to end - FordFulkerson.java
  19. Graph basic data structure - Graph.java
  20. Given a graph, color each vertex such that neighboring vertex does not have same color - GraphColoring.java
  21. BSF and DFS graph traversal - GraphTraversal.java
  22. Given a graph, find hamiltonian cycle in the graph if it exists. Hamiltonian cycle in undirected graph starts and ends at same point and traverses each vertex exactly once - HamiltonianCycle.java
  23. Find minimum spanning tree using Krushkal's algorithm - KrushkalMST.java
  24. A matching in a Bipartite Graph is a set of the edges chosen in such a way that no two edges share an endpoint - MaximumBiparteMatching.java
  25. Given a graph of 0s and 1s, find total number of islands of 1s - NumberOfIsland.java
  26. Given a graph, find total number of triangles in the graph - NumberofTriangles.java
  27. Prim's algorithm for minimum spanning tree - PrimMST.java
  28. Print all paths from source to destination in undirected graph - PrintAllPathFromSourceToDestination.java
  29. Given a directed graph, find strongly connected components of the graph - StronglyConnectedComponent.java
  30. Given a directed acyclic graph, sort is topologically - TopologicalSort.java
  31. Given a directed graph, find out if a vertex j is reachable from another vertex i for all vertex pairs (i, j) in the given graph - TransitiveClosure.java
  32. Clone directed graph - CloneDirectedGraph.java
  33. Disjoint set using path compression and union by rank DisjointSet.java
  34. Given a 2D floor plan of empty spaces, walls and multiple exits. Find distance of every empty space to closest exit. ShortestDistanceFromExit.java
  35. Tarjan's strongly connected component - TarjanStronglyConnectedComponent.java
  36. Tarjan's algorithm to find all simple cycles in directed graph - AllCyclesInDirectedGraphTarjan.java
  37. Johnson's algorithm for finding all cycles in directed graph - AllCyclesInDirectedGraphJohnson.java
  38. Traveling salesman problem using Held Karp Dynamic programming method - TravelingSalesmanHeldKarp.java
  39. Given a graph representing tree find minimum height tree - MinimumHeightTree.java
  40. Wall and gates question - WallsAndGates.java
  41. Schedule courses with prerequisites - CourseSchedule.java
  42. Evaluate division b/w parameters given existing divisions - EvaluateDivison.java
Clone this wiki locally