Razorpay Fraud Ring Strongly Connected Components
Razorpay Fraud Ring Strongly Connected Components
HardGraphs0% accepted
Razorpay detects fraud rings where transactions circulate. A strongly connected component (SCC) in the directed transaction graph indicates a potential ring. Given a directed graph, find all SCCs using Kosaraju or Tarjan algorithm.
Approach
Find all strongly connected components in a directed graph.
Input
5 5
0 2
2 1
1 0
0 3
3 4
Output
3
More Graphs problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards