/**
 * @Company Riot Games
 *
 * Given a list of kills, return the start of the 30 second window that contains the most number of kills.
 * A kill is defined as an integer array of the format [ timestamp, killerId, victimId ].
 * If there is a tie, then return an array of all the windows.
 *
 * The return format should be a list of all the windows with the most number of kills in the format of an array.
 * [ timestamp of the start of the window, number of kills ]
 *
 * Problem Ex.
 *   Input: [
 *     [ 1, 1, 2 ],
 *     [ 5, 1, 3 ],
 *     [ 15, 1, 5 ],
 *     [ 9, 2, 1 ],
 *     [ 11, 3, 1 ],
 *     [ 35, 5, 4 ],
 *     [ 15, 4, 3 ],
 *     [ 7, 4, 2 ],
 *     [ 31, 2, 1 ],
 *     [ 25, 6, 3 ],
 *   ]
 *   Output: [ 
 *     [ 1, 9 ] 
 *   ]
 *
 * Note: the list of kills are not in any specific order.
 */
public int[][] mostActiveKillWindow(int[][] kills) { }
@@ -347,107 +347,40 @@
 ows 
-with the most number of kills in the format of an array.%0A * %5B timestamp of the start of the window,
+(their start time) with the most
  num
@@ -391,18 +391,17 @@
 of kills
- %5D
+.
 %0A *%0A * P
@@ -657,30 +657,12 @@
 : %5B 
-%0A *     %5B 1, 9 %5D %0A *  
+1, 5
  %5D%0A 
@@ -727,60 +727,1218 @@
 .%0A *
-/%0Apublic int%5B%5D%5B%5D mostActiveKillWindow(int%5B%5D%5B%5D kills) %7B 
+%0A * Solution: O(N * logN) time and O(N) space.%0A */%0A%0Apublic static List%3CInteger%3E mostActiveKillWindow(int%5B%5D%5B%5D kills) %7B%0A  // Sort by the timestamp.%0A  Arrays.sort(kills, (a, b) -%3E a%5B0%5D - b%5B0%5D);%0A  int windowSize = 30;%0A%0A  // The last kill will be at the end now that it is sorted.%0A  int maxTime = kills%5Bkills.length - 1%5D%5B0%5D;%0A%0A  // Store the start time, end time, and the current kill count.%0A  int maxKill = Integer.MIN_VALUE;%0A  int%5B%5D%5B%5D windows = new int%5Bkills.length%5D%5B3%5D;%0A%0A  for (int i = 0; i %3C kills.length; i ++) %7B%0A    int killTime = kills%5Bi%5D%5B0%5D;%0A    // Populate the window sizes.%0A    windows%5Bi%5D%5B0%5D = kills%5Bi%5D%5B0%5D;%0A    windows%5Bi%5D%5B1%5D = kills%5Bi%5D%5B0%5D + 30;%0A    // Update all the windows that this may fit in.%0A    for (int j = 0; j %3C= i; j ++) %7B%0A      int start = windows%5Bj%5D%5B0%5D;%0A      int end = windows%5Bj%5D%5B1%5D;%0A%0A      if (killTime %3E= start && killTime %3C= end) %7B%0A        windows%5Bj%5D%5B2%5D ++;%0A      %7D%0A%0A      // Keep track of the highest kill count.%0A      maxKill = Math.max(maxKill, windows%5Bj%5D%5B2%5D);%0A    %7D%0A  %7D%0A%0A  // Add all the matching windows.%0A  List%3CInteger%3E res = new ArrayList%3CInteger%3E();%0A  for (int i = 0; i %3C kills.length; i ++) %7B%0A    if (windows%5Bi%5D%5B2%5D == maxKill) %7B%0A      res.add(windows%5Bi%5D%5B0%5D);%0A    %7D%0A  %7D%0A%0A  return res;%0A
 %7D

Add most active kill window for rito