Available question text
Given a directed graph of investment edges between countries, identify all countries from which every path eventually terminates and never reaches a cycle (i.e., "safe" nodes). This is a cycle-detection / graph-traversal problem — find nodes not in or that can't reach cycles using DFS three-color marking, reverse-topological pruning, or SCC decomposition.
Related questions
Continue with questions that share topics or the same question type.
- Build Array Where You Can Find The Maximum Exactly K Comparisons
Coding
- Can You Eat Your Favorite Candy on Your Favorite Day
Coding
- Coding test: Given a simple mockup implement that UI. Some CSS is already provided and an API to fetch the data also exists. The recruiter prep doc talked about structuring the code well, making sure all functions work, write CSS and write tests. There is no way you can do it all in 1 hour, so it's probably best to ask the interviewer what they expect
Coding
- for the technical phone screen both questions were leetcode tagged. You can not run your code on coderpad. You have to dry run your solution.
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1501. Countries You Can Safely Invest In
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source