Implement Function to Determine Mode and Prime Numbers
AmazonData Scientist · Technical ScreenLast updated
This question evaluates algorithmic problem-solving skills, including frequency analysis for mode computation, correct handling of ties and uniqueness edge cases, and basic number-theoretic competency for prime identification.
Scenario
Implementing utility algorithms within a data-processing library.
Question
Write a function that returns the mode of an integer list; if all values are unique return None, and support multiple modes when ties exist. Given an integer array containing 1 to n, output all prime numbers in the array.
Hints
Emphasize time complexity and edge-case handling.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.