Skip to content

Commit

Permalink
Update 1348_Tweet_Counts_Per_Frequency.java
Browse files Browse the repository at this point in the history
  • Loading branch information
seanprashad committed Apr 18, 2021
1 parent f19b536 commit eadac2c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Design/1348_Tweet_Counts_Per_Frequency.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public void recordTweet(String tweetName, int time) {
m.putIfAbsent(tweetName, new TreeMap<>());
TreeMap<Integer, Integer> times = m.get(tweetName);
times.put(time, times.getOrDefault(time, 0) + 1);
m.put(tweetName, times);
}

public List<Integer> getTweetCountsPerFrequency(String freq, String tweetName, int startTime, int endTime) {
Expand All @@ -23,8 +22,6 @@ public List<Integer> getTweetCountsPerFrequency(String freq, String tweetName, i
int intervalStart = startTime, intervalEnd = intervalStart + delta;

while (intervalStart <= endTime) {
// SortedMap<Integer, Integer> timesSubset = times.subMap(intervalStart, Math.min(intervalEnd, endTime + 1));

int count = 0;
for (Map.Entry<Integer, Integer> entry : times.subMap(intervalStart, Math.min(intervalEnd, endTime + 1))
.entrySet()) {
Expand Down

0 comments on commit eadac2c

Please sign in to comment.