Mobile Software Interview Questions

5,887 mobile software interview questions shared by candidates

given an API that looks like this: interface EventReporter { enum Interval = {SECOND, MINUTE, HOUR}; public void recordEvent(String eventName, LocalDateTime t); public Map<String, Int> getEventCounts(String eventName, LocalDateTime start, LocalDateTime end, Interval i) } and data that looks like this: "x", 20:00:01 "x", 20:00:01 "x", 20:00:15 "x", 20:10:00 "x", 20:58:00 Describe a data structure and how you might implement the API's that come up with counts (via the "getEventCounts") for these three different "interval" types: Ask for event counts for "x", from 20: to 21:, with interval Second, you'd get: {"20:00:01": 2, "20:00:15": 1, "20:10:00": 1, "20:58:00": 1} Or with interval Minute: "20:00" -> 3, "20:10" -> 1, "20:58" -> 1 Or with interval hour: "20" -> 5
avatar

Mobile Software Engineer

Interviewed at American Express

4.1
Feb 21, 2016

given an API that looks like this: interface EventReporter { enum Interval = {SECOND, MINUTE, HOUR}; public void recordEvent(String eventName, LocalDateTime t); public Map<String, Int> getEventCounts(String eventName, LocalDateTime start, LocalDateTime end, Interval i) } and data that looks like this: "x", 20:00:01 "x", 20:00:01 "x", 20:00:15 "x", 20:10:00 "x", 20:58:00 Describe a data structure and how you might implement the API's that come up with counts (via the "getEventCounts") for these three different "interval" types: Ask for event counts for "x", from 20: to 21:, with interval Second, you'd get: {"20:00:01": 2, "20:00:15": 1, "20:10:00": 1, "20:58:00": 1} Or with interval Minute: "20:00" -> 3, "20:10" -> 1, "20:58" -> 1 Or with interval hour: "20" -> 5

Viewing 1011 - 1020 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 5,887 interview questions and reports from Mobile software interviews. Prepare for your interview. Get hired. Love your job.