New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Reddit
Coding Question
AI Insights
Quick Summary
Find all distinct communities that share at least one direct follower with a specified target community.
Leverage the bidirectional mapping between communities and followers to traverse exactly one relationship hop.
Gracefully handle invalid indices or empty follower lists by returning an empty result.
What This Tests
Single-hop graph traversal and neighbor discovery
Hash-based deduplication and set operations
Boundary validation and array/list indexing
Relationship mapping and data structure utilization
Common Patterns
Graph Traversal
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected