From 3053ec50f15b7b9477ff65b44490e2909b9e36b9 Mon Sep 17 00:00:00 2001 From: Vincent Le Date: Tue, 20 Jun 2017 16:32:42 -0700 Subject: [PATCH] Add riot games #3 --- java/interview/largest-killstreak.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 java/interview/largest-killstreak.java diff --git a/java/interview/largest-killstreak.java b/java/interview/largest-killstreak.java new file mode 100644 index 0000000..e65e3eb --- /dev/null +++ b/java/interview/largest-killstreak.java @@ -0,0 +1,23 @@ +/** + * @Company Riot Games + * + * Given a list of kill events where a kill event is defined as [ timestamp, killerId, victimId ]. + * Return a list of the users who have the largest killstreak. A killstreak is defined as a sequence + * of kills where each kill is no more than 15 units of time from the next kill. + * + * If there is a tie of users with the largest killstreak, then return an array of them. + * The return format should be a list of all the users with the largest killstreak in the format of an array. + * [ killerId, number of kills ] + * + * Note: the list of kills are not in any specific order. + */ +public int[][] largestKillstreak(int[][] kills) { } + +/** + * Part 2 expands on the definition of killstreak. + * Killstreak is now defined as a sequence of kills where each kill is no more than 15 units of time from the next + * as well as not dying from the beginning of the sequence to the end of the sequence. + * + * This is more commonly the actual definition of a multi killstreak found in games. + */ +public int[][] largestKillstreak(int[][] kills) { } \ No newline at end of file