Katkat

Implement Function to Determine Mode and Prime Numbers

AmazonData Scientist · Technical Screen

Last 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.