Majority Element, Array Intersection, Nodes at Distance K
Filed under ServiceNow
The question
Find the majority element in an array, return intersection of two arrays with specific frequency rules without extra space, and print all nodes at distance k from a given node in a binary tree.
No write-up yet. Related questions below have one.
Related ServiceNow questions
Collected from public candidate posts and coding forums. Updated Nov 2026.